diff options
author | Mark Glines <mark@glines.org> | 2007-05-31 18:44:48 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-06-03 21:08:43 -0400 |
commit | 3f196eb519a419bf83ecc22753943fd0a0de4f8f (patch) | |
tree | 0dbec7698b6bebd5c6bccd5a02246ff3edf4efa6 /net/ipv4/tcp.c | |
parent | 278a3de5abc7901805689a66340b5af9882b4f9a (diff) |
[TCP]: Use default 32768-61000 outgoing port range in all cases.
This diff changes the default port range used for outgoing connections,
from "use 32768-61000 in most cases, but use N-4999 on small boxes
(where N is a multiple of 1024, depending on just *how* small the box
is)" to just "use 32768-61000 in all cases".
I don't believe there are any drawbacks to this change, and it keeps
outgoing connection ports farther away from the mess of
IANA-registered ports.
Signed-off-by: Mark Glines <mark@glines.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 3 |
1 files changed, 0 insertions, 3 deletions
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; |