diff options
author | David S. Miller <davem@davemloft.net> | 2013-10-23 17:01:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-23 17:01:51 -0400 |
commit | 0cad43a7484179ec349e8e5792c558ee787a06ba (patch) | |
tree | 5e0931546c135c8802911ed2e5218c825b59ae2f /net/ipv4/ip_fragment.c | |
parent | df33db0f5efe8895203d221b9e701c0a61832c76 (diff) | |
parent | 7088ad74e6e710d0c80ea2cead9500f47a2a5d58 (diff) |
Merge branch 'frag_hash_secret'
Hannes Frederic Sowa says:
====================
initialize fragment hash secrets with net_get_random_once
This series switches the inet_frag.rnd hash initialization to
net_get_random_once.
Included patches:
ipv4: initialize ip4_frags hash secret as late
ipv6: split inet6_hash_frag for netfilter and
inet: remove old fragmentation hash initializing
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_fragment.c')
-rw-r--r-- | net/ipv4/ip_fragment.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index b66910aaef4d..2481993a4970 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c | |||
@@ -106,6 +106,7 @@ struct ip4_create_arg { | |||
106 | 106 | ||
107 | static unsigned int ipqhashfn(__be16 id, __be32 saddr, __be32 daddr, u8 prot) | 107 | static unsigned int ipqhashfn(__be16 id, __be32 saddr, __be32 daddr, u8 prot) |
108 | { | 108 | { |
109 | net_get_random_once(&ip4_frags.rnd, sizeof(ip4_frags.rnd)); | ||
109 | return jhash_3words((__force u32)id << 16 | prot, | 110 | return jhash_3words((__force u32)id << 16 | prot, |
110 | (__force u32)saddr, (__force u32)daddr, | 111 | (__force u32)saddr, (__force u32)daddr, |
111 | ip4_frags.rnd) & (INETFRAGS_HASHSZ - 1); | 112 | ip4_frags.rnd) & (INETFRAGS_HASHSZ - 1); |