diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2005-11-03 19:33:23 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-11-05 18:23:15 -0500 |
commit | 6df716340da3a6fdd33d73d7ed4c6f7590ca1c42 (patch) | |
tree | 1b3ba3d1a0a08b9b4eaa624a66414b87a70b6fe9 /net/ipv4/tcp.c | |
parent | 6151b31c9616d71f714fc7ef8e2306f67f3b94c3 (diff) |
[TCP/DCCP]: Randomize port selection
This patch randomizes the port selected on bind() for connections
to help with possible security attacks. It should also be faster
in most cases because there is no need for a global lock.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index f3f0013a9580..72b7c22e1ea5 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -2112,7 +2112,6 @@ void __init tcp_init(void) | |||
2112 | sysctl_tcp_max_orphans >>= (3 - order); | 2112 | sysctl_tcp_max_orphans >>= (3 - order); |
2113 | sysctl_max_syn_backlog = 128; | 2113 | sysctl_max_syn_backlog = 128; |
2114 | } | 2114 | } |
2115 | tcp_hashinfo.port_rover = sysctl_local_port_range[0] - 1; | ||
2116 | 2115 | ||
2117 | sysctl_tcp_mem[0] = 768 << order; | 2116 | sysctl_tcp_mem[0] = 768 << order; |
2118 | sysctl_tcp_mem[1] = 1024 << order; | 2117 | sysctl_tcp_mem[1] = 1024 << order; |