diff options
author | Florian Westphal <fw@strlen.de> | 2014-07-24 10:50:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-28 01:34:35 -0400 |
commit | fb3cfe6e75b9d05c87265e85e67d7caf6e5b44a7 (patch) | |
tree | 3dfe9c9ddebc20bd61571db6d23ff660a67a3485 /net/ipv4/ip_fragment.c | |
parent | 36c7778218b93d96d88d68f116a711f6a598b72f (diff) |
inet: frag: remove hash size assumptions from callers
hide actual hash size from individual users: The _find
function will now fold the given hash value into the required range.
Signed-off-by: Florian Westphal <fw@strlen.de>
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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index 586e6aaf9e6e..b769eb6c83c0 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c | |||
@@ -109,7 +109,7 @@ static unsigned int ipqhashfn(__be16 id, __be32 saddr, __be32 daddr, u8 prot) | |||
109 | net_get_random_once(&ip4_frags.rnd, sizeof(ip4_frags.rnd)); | 109 | net_get_random_once(&ip4_frags.rnd, sizeof(ip4_frags.rnd)); |
110 | return jhash_3words((__force u32)id << 16 | prot, | 110 | return jhash_3words((__force u32)id << 16 | prot, |
111 | (__force u32)saddr, (__force u32)daddr, | 111 | (__force u32)saddr, (__force u32)daddr, |
112 | ip4_frags.rnd) & (INETFRAGS_HASHSZ - 1); | 112 | ip4_frags.rnd); |
113 | } | 113 | } |
114 | 114 | ||
115 | static unsigned int ip4_hashfn(const struct inet_frag_queue *q) | 115 | static unsigned int ip4_hashfn(const struct inet_frag_queue *q) |