mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 10:45:49 +00:00
Here is a batman-adv bugfix:
- Fix DAT candidate selection on little endian systems, by Sven Eckelmann -----BEGIN PGP SIGNATURE----- iQJKBAABCgA0FiEE1ilQI7G+y+fdhnrfoSvjmEKSnqEFAl4dzQUWHHN3QHNpbW9u d3VuZGVybGljaC5kZQAKCRChK+OYQpKeoQFuD/44PUv3jHW9S8aIu5FobWHlswOg e1p9g98QdO7dezkkQa64tuFMR6mgVefOeK2+LHCZQ3Svd6xeGaxEGNo6vdzrkyrj iRl/5nY8hRZ3jIdD7kOG11yX/ra+3BSWMWS4yu0OAawYFMYxakW6qUR7OUaqL9xv Qr/XHu7S/tpy4MGUDabu11KlJGyZBfyXQxEKmSjjfWVITqVKNeoZONFqm2lmLOHs RppvTjzdTf3HUPp6C9rC1b6phN7G8XLRXqXrgY4LzTDmwHbOmPvJQ1t+kh9dfZuX DYsv89dl4iVIcSUY9fyUA9YxSHRyqiXRDDG0DPIy0AqRrHy0HgdGTlwCkS1idl1H okiuO5rUzpDFGG5F8BRKY2t29JN8BO+/YVZpa5bl9ZgQQpnuBu+kkbceYCHY0lat h2y3AMsJUcWEbFsa/ulEmHw8aj38rE4lgd7lhLir04BFVZHVB+faH78MQ7xB7+Xl lPl4ptf3l3mwWW/tXbuWa6bXjCg5UBAOr4fEyhrg8fM0rst8LG6trWZWlWgZykLe 3HSnaR00tH8DiMPf/Zl7tAX/dKCmzCo6h7mXUAfvw1PktOvWC1JhtjchJASOqnoP peD45G5W3DGgxtmfcl6J33BmMllbxeT1N6sQRApliYvcrrMZ9gVzr2sHFxHftFXl kyCpbAlfAZ6ceGYCuQ== =6zKP -----END PGP SIGNATURE----- Merge tag 'batadv-net-for-davem-20200114' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here is a batman-adv bugfix: - Fix DAT candidate selection on little endian systems, by Sven Eckelmann ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
5a40420e04
@ -285,6 +285,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 = (const unsigned char *)&dat->ip;
|
||||
@ -294,7 +295,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);
|
||||
|
Loading…
Reference in New Issue
Block a user