aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2012-10-09 16:35:47 -0400
committerDavid S. Miller <davem@davemloft.net>2012-10-10 22:41:21 -0400
commit321fb991399bd7b156f8b15a8acfa0c8622e3c68 (patch)
tree0fb43e03c3e2ab028520804bbaa4325eb3a06cd6 /drivers/net
parentef59febe3b2aa475bc2bf5b390db5e189f395710 (diff)
vxlan: fix byte order in hash function
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/vxlan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 92150c0cf4d9..882a041d7594 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -228,9 +228,9 @@ static u32 eth_hash(const unsigned char *addr)
228 228
229 /* only want 6 bytes */ 229 /* only want 6 bytes */
230#ifdef __BIG_ENDIAN 230#ifdef __BIG_ENDIAN
231 value <<= 16;
232#else
233 value >>= 16; 231 value >>= 16;
232#else
233 value <<= 16;
234#endif 234#endif
235 return hash_64(value, FDB_HASH_BITS); 235 return hash_64(value, FDB_HASH_BITS);
236} 236}