]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: Initialize gw sel_class via batadv_algo
authorSven Eckelmann <sven@narfation.org>
Sat, 4 Mar 2017 14:48:50 +0000 (15:48 +0100)
committerSimon Wunderlich <sw@simonwunderlich.de>
Sat, 4 Mar 2017 16:32:06 +0000 (17:32 +0100)
commitffa6117d4bdfe7d527409361583fd209b0f95210
tree49d04bcbc3089b8f3f89bc4ddbdf2f279e58c4ce
parent803bad46efa55fb1c928395140341a36101f5886
batman-adv: Initialize gw sel_class via batadv_algo

The gateway selection class variable is shared between different algorithm
versions. But the interpretation of the content is algorithm specific. The
initialization is therefore also algorithm specific.

But this was implemented incorrectly and the initialization for BATMAN_V
always overwrote the value previously written for BATMAN_IV. This could
only be avoided when BATMAN_V was disabled during compile time.

Using a special batadv_algo hook for this initialization avoids this
problem.

Fixes: e469b54eaaa7 ("batman-adv: B.A.T.M.A.N. V - implement GW selection logic")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/bat_iv_ogm.c
net/batman-adv/bat_v.c
net/batman-adv/gateway_common.c
net/batman-adv/soft-interface.c
net/batman-adv/types.h