Commit 036a2b37 authored by Ralph Loader's avatar Ralph Loader Committed by David S. Miller

[IPV6]: Trivial fix for ipv6_addr_hash()

ipv6_addr_hash doesn't do what it's comment says.  The comment was
probably what was intended, not that it'll make much difference in
practice.
Signed-off-by: default avatarRalph Loader <suckfish@ihug.co.nz>
Signed-off-by: default avatarYoshifuji Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent 47a69521
......@@ -178,8 +178,8 @@ static __inline__ u8 ipv6_addr_hash(const struct in6_addr *addr)
* This will include the IEEE address token on links that support it.
*/
word = addr->s6_addr[2] ^ addr->s6_addr32[3];
word ^= (word>>16);
word = addr->s6_addr32[2] ^ addr->s6_addr32[3];
word ^= (word >> 16);
word ^= (word >> 8);
return ((word ^ (word >> 4)) & 0x0f);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment