diff options
author | David S. Miller <davem@davemloft.net> | 2020-01-19 22:10:04 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-19 22:10:04 +0100 |
commit | b3f7e3f23a763ccaae7b52d88d2c91e66c80d406 (patch) | |
tree | e00e90eb161305ed9895315ba12e30ac17de9523 /net/batman-adv | |
parent | Merge branch 'mlxsw-Add-tunnel-devlink-trap-support' (diff) | |
parent | Merge tag 'riscv/for-v5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff) | |
download | linux-b3f7e3f23a763ccaae7b52d88d2c91e66c80d406.tar.xz linux-b3f7e3f23a763ccaae7b52d88d2c91e66c80d406.zip |
Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/distributed-arp-table.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c index 906011b60d66..3d21dd83f8cc 100644 --- a/net/batman-adv/distributed-arp-table.c +++ b/net/batman-adv/distributed-arp-table.c @@ -287,6 +287,7 @@ static u32 batadv_hash_dat(const void *data, u32 size) u32 hash = 0; const struct batadv_dat_entry *dat = data; const unsigned char *key; + __be16 vid; u32 i; key = (__force const unsigned char *)&dat->ip; @@ -296,7 +297,8 @@ static u32 batadv_hash_dat(const void *data, u32 size) hash ^= (hash >> 6); } - key = (const unsigned char *)&dat->vid; + vid = htons(dat->vid); + key = (__force const unsigned char *)&vid; for (i = 0; i < sizeof(dat->vid); i++) { hash += key[i]; hash += (hash << 10); |