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)
commit07568d0369f93cd54d2e5ca6f5c64f5b55557857
treef30f4188b200b9cdb1d3b68d52f1d791e4791ac3
parentbf0098f22ca7b59e8844ac6882bbae230d34b98d
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