Skip to content

Commit

Permalink
IPv6: use ipv6_addr_v4mapped()
Browse files Browse the repository at this point in the history
Change udp6_portaddr_hash() to use ipv6_addr_v4mapped()
inline instead of ipv6_addr_type().

Signed-off-by: Brian Haley <brian.haley@hp.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Brian Haley authored and David S. Miller committed Nov 11, 2009
1 parent 246c65a commit 856540e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static unsigned int udp6_portaddr_hash(struct net *net,

if (ipv6_addr_any(addr6))
hash = jhash_1word(0, mix);
else if (ipv6_addr_type(addr6) == IPV6_ADDR_MAPPED)
else if (ipv6_addr_v4mapped(addr6))
hash = jhash_1word(addr6->s6_addr32[3], mix);
else
hash = jhash2(addr6->s6_addr32, 4, mix);
Expand Down

0 comments on commit 856540e

Please sign in to comment.