diff options
Diffstat (limited to 'net/ipv4/inet_hashtables.c')
-rw-r--r-- | net/ipv4/inet_hashtables.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c index 18aa668d0cc9..8b9cf279450d 100644 --- a/net/ipv4/inet_hashtables.c +++ b/net/ipv4/inet_hashtables.c | |||
@@ -28,6 +28,10 @@ static unsigned int inet_ehashfn(struct net *net, const __be32 laddr, | |||
28 | const __u16 lport, const __be32 faddr, | 28 | const __u16 lport, const __be32 faddr, |
29 | const __be16 fport) | 29 | const __be16 fport) |
30 | { | 30 | { |
31 | static u32 inet_ehash_secret __read_mostly; | ||
32 | |||
33 | net_get_random_once(&inet_ehash_secret, sizeof(inet_ehash_secret)); | ||
34 | |||
31 | return __inet_ehashfn(laddr, lport, faddr, fport, | 35 | return __inet_ehashfn(laddr, lport, faddr, fport, |
32 | inet_ehash_secret + net_hash_mix(net)); | 36 | inet_ehash_secret + net_hash_mix(net)); |
33 | } | 37 | } |