diff options
-rw-r--r-- | net/ipv4/inet_connection_sock.c | 4 | ||||
-rw-r--r-- | net/ipv4/tcp.c | 3 |
2 files changed, 1 insertions, 6 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 43fb1600f1f0..fbe7714f21d0 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c | |||
@@ -31,10 +31,8 @@ EXPORT_SYMBOL(inet_csk_timer_bug_msg); | |||
31 | 31 | ||
32 | /* | 32 | /* |
33 | * This array holds the first and last local port number. | 33 | * This array holds the first and last local port number. |
34 | * For high-usage systems, use sysctl to change this to | ||
35 | * 32768-61000 | ||
36 | */ | 34 | */ |
37 | int sysctl_local_port_range[2] = { 1024, 4999 }; | 35 | int sysctl_local_port_range[2] = { 32768, 61000 }; |
38 | 36 | ||
39 | int inet_csk_bind_conflict(const struct sock *sk, | 37 | int inet_csk_bind_conflict(const struct sock *sk, |
40 | const struct inet_bind_bucket *tb) | 38 | const struct inet_bind_bucket *tb) |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 766314505c09..cd3c7e95de9e 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -2464,13 +2464,10 @@ void __init tcp_init(void) | |||
2464 | order++) | 2464 | order++) |
2465 | ; | 2465 | ; |
2466 | if (order >= 4) { | 2466 | if (order >= 4) { |
2467 | sysctl_local_port_range[0] = 32768; | ||
2468 | sysctl_local_port_range[1] = 61000; | ||
2469 | tcp_death_row.sysctl_max_tw_buckets = 180000; | 2467 | tcp_death_row.sysctl_max_tw_buckets = 180000; |
2470 | sysctl_tcp_max_orphans = 4096 << (order - 4); | 2468 | sysctl_tcp_max_orphans = 4096 << (order - 4); |
2471 | sysctl_max_syn_backlog = 1024; | 2469 | sysctl_max_syn_backlog = 1024; |
2472 | } else if (order < 3) { | 2470 | } else if (order < 3) { |
2473 | sysctl_local_port_range[0] = 1024 * (3 - order); | ||
2474 | tcp_death_row.sysctl_max_tw_buckets >>= (3 - order); | 2471 | tcp_death_row.sysctl_max_tw_buckets >>= (3 - order); |
2475 | sysctl_tcp_max_orphans >>= (3 - order); | 2472 | sysctl_tcp_max_orphans >>= (3 - order); |
2476 | sysctl_max_syn_backlog = 128; | 2473 | sysctl_max_syn_backlog = 128; |