net: Fix various endianness glitches
Sparse can help us find endianness bugs, but we need to make some cleanups to be able to more easily spot real bugs. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
cb903bf4ee
commit
0eae88f31c
@@ -91,9 +91,9 @@ static unsigned int udp6_portaddr_hash(struct net *net,
|
||||
if (ipv6_addr_any(addr6))
|
||||
hash = jhash_1word(0, mix);
|
||||
else if (ipv6_addr_v4mapped(addr6))
|
||||
hash = jhash_1word(addr6->s6_addr32[3], mix);
|
||||
hash = jhash_1word((__force u32)addr6->s6_addr32[3], mix);
|
||||
else
|
||||
hash = jhash2(addr6->s6_addr32, 4, mix);
|
||||
hash = jhash2((__force u32 *)addr6->s6_addr32, 4, mix);
|
||||
|
||||
return hash ^ port;
|
||||
}
|
||||
|
Reference in New Issue
Block a user