[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>
This commit is contained in:

committed by
David S. Miller

parent
3c0cfc1358
commit
0639300900
@@ -1172,9 +1172,6 @@ SCTP_STATIC __init int sctp_init(void)
|
||||
sctp_port_hashtable[i].chain = NULL;
|
||||
}
|
||||
|
||||
spin_lock_init(&sctp_port_alloc_lock);
|
||||
sctp_port_rover = sysctl_local_port_range[0] - 1;
|
||||
|
||||
printk(KERN_INFO "SCTP: Hash tables configured "
|
||||
"(established %d bind %d)\n",
|
||||
sctp_assoc_hashsize, sctp_port_hashsize);
|
||||
|
Reference in New Issue
Block a user