diff options
author | David S. Miller <davem@davemloft.net> | 2007-03-23 14:40:27 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:28:06 -0400 |
commit | b3da2cf37c5c6e47698957a25ab43a7223dbb90f (patch) | |
tree | e8892392aaf7e3d3544ede23c21791e2317b177d /net/ipv6/af_inet6.c | |
parent | d30045a0bcf144753869175dd9d840f7ceaf4aba (diff) |
[INET]: Use jhash + random secret for ehash.
The days are gone when this was not an issue, there are folks out
there with huge bot networks that can be used to attack the
established hash tables on remote systems.
So just like the routing cache and connection tracking
hash, use Jenkins hash with random secret input.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r-- | net/ipv6/af_inet6.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 82572b507547..df31cdd33cda 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -98,6 +98,11 @@ static int inet6_create(struct socket *sock, int protocol) | |||
98 | int try_loading_module = 0; | 98 | int try_loading_module = 0; |
99 | int err; | 99 | int err; |
100 | 100 | ||
101 | if (sock->type != SOCK_RAW && | ||
102 | sock->type != SOCK_DGRAM && | ||
103 | !inet_ehash_secret) | ||
104 | build_ehash_secret(); | ||
105 | |||
101 | /* Look for the requested type/protocol pair. */ | 106 | /* Look for the requested type/protocol pair. */ |
102 | answer = NULL; | 107 | answer = NULL; |
103 | lookup_protocol: | 108 | lookup_protocol: |