Skip to content

Commit

Permalink
ipv6 route: Use ipv6_addr_hash() in rt6_info_hash_nhsfn().
Browse files Browse the repository at this point in the history
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
YOSHIFUJI Hideaki / 吉藤英明 authored and David S. Miller committed Jan 14, 2013
1 parent daad151 commit c08977b
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,15 +388,8 @@ static int rt6_info_hash_nhsfn(unsigned int candidate_count,
{
unsigned int val = fl6->flowi6_proto;

val ^= (__force u32)fl6->daddr.s6_addr32[0];
val ^= (__force u32)fl6->daddr.s6_addr32[1];
val ^= (__force u32)fl6->daddr.s6_addr32[2];
val ^= (__force u32)fl6->daddr.s6_addr32[3];

val ^= (__force u32)fl6->saddr.s6_addr32[0];
val ^= (__force u32)fl6->saddr.s6_addr32[1];
val ^= (__force u32)fl6->saddr.s6_addr32[2];
val ^= (__force u32)fl6->saddr.s6_addr32[3];
val ^= ipv6_addr_hash(&fl6->daddr);
val ^= ipv6_addr_hash(&fl6->saddr);

/* Work only if this not encapsulated */
switch (fl6->flowi6_proto) {
Expand Down

0 comments on commit c08977b

Please sign in to comment.