b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] batman-adv: fix logic error in batadv_v_ogm_forward
@ 2016-02-12 10:35 Simon Wunderlich
  2016-02-15  8:30 ` Sven Eckelmann
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Wunderlich @ 2016-02-12 10:35 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Simon Wunderlich

From: Simon Wunderlich <simon.wunderlich@open-mesh.com>

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 <sven.eckelmann@open-mesh.com>
Signed-off-by: Simon Wunderlich <simon.wunderlich@open-mesh.com>
---
 net/batman-adv/bat_v_ogm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/batman-adv/bat_v_ogm.c b/net/batman-adv/bat_v_ogm.c
index 1b2399e..4155fa5 100644
--- a/net/batman-adv/bat_v_ogm.c
+++ b/net/batman-adv/bat_v_ogm.c
@@ -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);
-- 
2.7.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: fix logic error in batadv_v_ogm_forward
  2016-02-12 10:35 [B.A.T.M.A.N.] [PATCH] batman-adv: fix logic error in batadv_v_ogm_forward Simon Wunderlich
@ 2016-02-15  8:30 ` Sven Eckelmann
  2016-02-16  9:07   ` Marek Lindner
  0 siblings, 1 reply; 3+ messages in thread
From: Sven Eckelmann @ 2016-02-15  8:30 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Simon Wunderlich

On Friday 12 February 2016 11:35:35 Simon Wunderlich wrote:
> From: Simon Wunderlich <simon.wunderlich@open-mesh.com>
> 
> 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 <sven.eckelmann@open-mesh.com>
> Signed-off-by: Simon Wunderlich <simon.wunderlich@open-mesh.com>

Thanks for the fast update. It fixes the problem in my setup

Tested-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

> ---
>  net/batman-adv/bat_v_ogm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/batman-adv/bat_v_ogm.c b/net/batman-adv/bat_v_ogm.c
> index 1b2399e..4155fa5 100644
> --- a/net/batman-adv/bat_v_ogm.c
> +++ b/net/batman-adv/bat_v_ogm.c
> @@ -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);
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: fix logic error in batadv_v_ogm_forward
  2016-02-15  8:30 ` Sven Eckelmann
@ 2016-02-16  9:07   ` Marek Lindner
  0 siblings, 0 replies; 3+ messages in thread
From: Marek Lindner @ 2016-02-16  9:07 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Sven Eckelmann, Simon Wunderlich

[-- Attachment #1: Type: text/plain, Size: 749 bytes --]

On Monday, February 15, 2016 09:30:09 Sven Eckelmann wrote:
> On Friday 12 February 2016 11:35:35 Simon Wunderlich wrote:
> > From: Simon Wunderlich <simon.wunderlich@open-mesh.com>
> >
> > 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 <sven.eckelmann@open-mesh.com>
> > Signed-off-by: Simon Wunderlich <simon.wunderlich@open-mesh.com>
> 
> Thanks for the fast update. It fixes the problem in my setup
> 
> Tested-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

Applied in revision ef30ba9.

Thanks,
Marek

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-16  9:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-12 10:35 [B.A.T.M.A.N.] [PATCH] batman-adv: fix logic error in batadv_v_ogm_forward Simon Wunderlich
2016-02-15  8:30 ` Sven Eckelmann
2016-02-16  9:07   ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).