Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user