diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-10-10 20:30:18 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-10-10 20:30:18 -0400 |
commit | 06393009000779b00a558fd2f280882cc7dc2008 (patch) | |
tree | 0cd2e1f4cedd58c3c8056018bb6148dddd21d6ab /net/sctp/protocol.c | |
parent | 3c0cfc135829b98f7a4894938652f9ef78e24237 (diff) |
[SCTP]: port randomization
Add port randomization rather than a simple fixed rover
for use with SCTP. This makes it act similar to TCP, UDP, DCCP
when allocating ports.
No longer need port_alloc_lock as well (suggestion by Brian Haley).
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r-- | net/sctp/protocol.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 4e6b59e8b695..81b26c5ffd4b 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -1172,9 +1172,6 @@ SCTP_STATIC __init int sctp_init(void) | |||
1172 | sctp_port_hashtable[i].chain = NULL; | 1172 | sctp_port_hashtable[i].chain = NULL; |
1173 | } | 1173 | } |
1174 | 1174 | ||
1175 | spin_lock_init(&sctp_port_alloc_lock); | ||
1176 | sctp_port_rover = sysctl_local_port_range[0] - 1; | ||
1177 | |||
1178 | printk(KERN_INFO "SCTP: Hash tables configured " | 1175 | printk(KERN_INFO "SCTP: Hash tables configured " |
1179 | "(established %d bind %d)\n", | 1176 | "(established %d bind %d)\n", |
1180 | sctp_assoc_hashsize, sctp_port_hashsize); | 1177 | sctp_assoc_hashsize, sctp_port_hashsize); |