]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[TCP]: Use default 32768-61000 outgoing port range in all cases.
authorMark Glines <mark@glines.org>
Thu, 31 May 2007 22:44:48 +0000 (15:44 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 4 Jun 2007 01:08:43 +0000 (18:08 -0700)
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>
net/ipv4/inet_connection_sock.c
net/ipv4/tcp.c

index 43fb1600f1f03904846bc3d53a98c73e0f729a61..fbe7714f21d08593beecb3945f2f85848b506be8 100644 (file)
@@ -31,10 +31,8 @@ EXPORT_SYMBOL(inet_csk_timer_bug_msg);
 
 /*
  * This array holds the first and last local port number.
- * For high-usage systems, use sysctl to change this to
- * 32768-61000
  */
-int sysctl_local_port_range[2] = { 1024, 4999 };
+int sysctl_local_port_range[2] = { 32768, 61000 };
 
 int inet_csk_bind_conflict(const struct sock *sk,
                           const struct inet_bind_bucket *tb)
index 766314505c096b80ede892a483b5df9d35239da0..cd3c7e95de9e07296de8583fdc5b3df73aa45cdf 100644 (file)
@@ -2464,13 +2464,10 @@ void __init tcp_init(void)
                        order++)
                ;
        if (order >= 4) {
-               sysctl_local_port_range[0] = 32768;
-               sysctl_local_port_range[1] = 61000;
                tcp_death_row.sysctl_max_tw_buckets = 180000;
                sysctl_tcp_max_orphans = 4096 << (order - 4);
                sysctl_max_syn_backlog = 1024;
        } else if (order < 3) {
-               sysctl_local_port_range[0] = 1024 * (3 - order);
                tcp_death_row.sysctl_max_tw_buckets >>= (3 - order);
                sysctl_tcp_max_orphans >>= (3 - order);
                sysctl_max_syn_backlog = 128;