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 /include/net | |
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 'include/net')
-rw-r--r-- | include/net/inet_hashtables.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index f50f95968340..07840baa9341 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -125,9 +125,7 @@ struct inet_hashinfo { | |||
125 | rwlock_t lhash_lock ____cacheline_aligned; | 125 | rwlock_t lhash_lock ____cacheline_aligned; |
126 | atomic_t lhash_users; | 126 | atomic_t lhash_users; |
127 | wait_queue_head_t lhash_wait; | 127 | wait_queue_head_t lhash_wait; |
128 | spinlock_t portalloc_lock; | ||
129 | kmem_cache_t *bind_bucket_cachep; | 128 | kmem_cache_t *bind_bucket_cachep; |
130 | int port_rover; | ||
131 | }; | 129 | }; |
132 | 130 | ||
133 | static inline unsigned int inet_ehashfn(const __u32 laddr, const __u16 lport, | 131 | static inline unsigned int inet_ehashfn(const __u32 laddr, const __u16 lport, |