mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
36c7778218
commit
fb3cfe6e75
5 changed files with 19 additions and 23 deletions
|
@ -109,7 +109,7 @@ static unsigned int ipqhashfn(__be16 id, __be32 saddr, __be32 daddr, u8 prot)
|
|||
net_get_random_once(&ip4_frags.rnd, sizeof(ip4_frags.rnd));
|
||||
return jhash_3words((__force u32)id << 16 | prot,
|
||||
(__force u32)saddr, (__force u32)daddr,
|
||||
ip4_frags.rnd) & (INETFRAGS_HASHSZ - 1);
|
||||
ip4_frags.rnd);
|
||||
}
|
||||
|
||||
static unsigned int ip4_hashfn(const struct inet_frag_queue *q)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue