]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: don't rely on positions in struct for hashing
authorSimon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
Thu, 30 Aug 2012 16:22:27 +0000 (18:22 +0200)
committerAntonio Quartulli <ordex@autistici.org>
Wed, 14 Nov 2012 20:00:32 +0000 (21:00 +0100)
commit44d30dfb20c46fb4ab0e946f6d6d39f679a0a488
treef30f4188b200b9cdb1d3b68d52f1d791e4791ac3
parenta90e2bc719a9169f85d776f951a6321a8f24cf7b
batman-adv: don't rely on positions in struct for hashing

The hash functions in the bridge loop avoidance code expects the
VLAN vid to be right after the mac address, but this is not guaranteed.

Fix this by explicitly hashing over the right fields of the struct.

Reported-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
net/batman-adv/bridge_loop_avoidance.c
net/batman-adv/hash.h