]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: bla: fix type misuse for backbone_gw hash indexing
authorLinus Lüssing <ll@simonwunderlich.de>
Thu, 27 Aug 2020 15:34:48 +0000 (17:34 +0200)
committerSimon Wunderlich <sw@simonwunderlich.de>
Thu, 27 Aug 2020 15:41:45 +0000 (17:41 +0200)
commit2e4bcea423d9198ec3e8b93416c0ac04569698b7
treee7bce462255ddd298aa27b4b26aeefcb0df8c28a
parent2a88b87baea189851fe1ebeaf3e2768c7afcd44f
batman-adv: bla: fix type misuse for backbone_gw hash indexing

It seems that due to a copy & paste error the void pointer
in batadv_choose_backbone_gw() is cast to the wrong type.

Fixing this by using "struct batadv_bla_backbone_gw" instead of "struct
batadv_bla_claim" which better matches the caller's side.

For now it seems that we were lucky because the two structs both have
their orig/vid and addr/vid in the beginning. However I stumbled over
this issue when I was trying to add some debug variables in front of
"orig" in batadv_backbone_gw, which caused hash lookups to fail.

Fixes: 06d4f08ea4b5 ("batman-adv: don't rely on positions in struct for hashing")
Signed-off-by: Linus Lüssing <ll@simonwunderlich.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
net/batman-adv/bridge_loop_avoidance.c