batman-adv: fix logic error in batadv_v_ogm_forward
Simon Wunderlich
maintainerPATCH 1/1 batman-adv: fix logic error in batadv_v_ogm_forward
From: Simon Wunderlich <[email protected]>
My latest restructure attempt of the BATMAN v forward function introduced a regression, causing kernel crashes when an OGM is forwarded. This patch fixes it.
batadv_v_ogm_forward")
--- net/batman-adv/bat_v_ogm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/batman-adv/bat_v_ogm.c +1 -1
@@ -309,7 +309,7 @@ static void batadv_v_ogm_forward(struct batadv_priv *bat_priv,u16 tvlv_len;/* only forward for specific interfaces, not for the default one. */ -if (if_outgoing !=BATADV_IF_DEFAULT ) +if (if_outgoing ==BATADV_IF_DEFAULT ) goto out; orig_ifinfo =batadv_orig_ifinfo_new (orig_node, if_outgoing);
Signature · 1 line
2.7.0
Quoted 10 lines · On Friday 12 February 2016 11:35:35 Simon Wunderlich wrote:
From: Simon Wunderlich <[email protected]>
My latest restructure attempt of the BATMAN v forward function introduced a regression, causing kernel crashes when an OGM is forwarded. This patch fixes it.
Fixes 30c96bc787 ("batman-adv: move and restructure
batadv_v_ogm_forward")Reported-by Sven Eckelmann <[email protected]>Signed-off-by Simon Wunderlich <[email protected]>
Thanks for the fast update. It fixes the problem in my setup
Quoted 18 lines
--- net/batman-adv/bat_v_ogm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/batman-adv/bat_v_ogm.c +1
-1@@ -309,7 +309,7 @@ static void batadv_v_ogm_forward(struct batadv_priv *bat_priv,u16 tvlv_len;/* only forward for specific interfaces, not for the default one. */ -if (if_outgoing !=BATADV_IF_DEFAULT ) +if (if_outgoing ==BATADV_IF_DEFAULT ) goto out; orig_ifinfo =batadv_orig_ifinfo_new (orig_node, if_outgoing);
Marek Lindner
AppliedQuoted 7 lines · On Monday, February 15, 2016 09:30:09 Sven Eckelmann wrote:
Quoted 6 lines · On Friday 12 February 2016 11:35:35 Simon Wunderlich wrote:
From: Simon Wunderlich <[email protected]>
My latest restructure attempt of the BATMAN v forward function introduced a regression, causing kernel crashes when an OGM is forwarded. This patch fixes it.
Quoted 8 lines
Quoted 4 lines
Fixes 30c96bc787 ("batman-adv: move and restructure
batadv_v_ogm_forward")Reported-by Sven Eckelmann <[email protected]>Signed-off-by Simon Wunderlich <[email protected]>Thanks for the fast update. It fixes the problem in my setup
Tested-by Sven Eckelmann <[email protected]>
Applied in revision ef30ba9.
Thanks,
Marek