Skip to content

Commit

Permalink
vxlan: fix byte order in hash function
Browse files Browse the repository at this point in the history
Shift was wrong direction causing packets to hash based on
other parts of the ethernet header, not the address.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
stephen hemminger authored and David S. Miller committed Oct 11, 2012
1 parent ef59feb commit 321fb99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@ static u32 eth_hash(const unsigned char *addr)

/* only want 6 bytes */
#ifdef __BIG_ENDIAN
value <<= 16;
#else
value >>= 16;
#else
value <<= 16;
#endif
return hash_64(value, FDB_HASH_BITS);
}
Expand Down

0 comments on commit 321fb99

Please sign in to comment.