b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH maint v3] batman-adv: Fix multicast packet loss with a single WANT_ALL_IPV4/6 flag
@ 2018-03-04 12:08 Linus Lüssing
  2018-03-04 12:47 ` Sven Eckelmann
  0 siblings, 1 reply; 2+ messages in thread
From: Linus Lüssing @ 2018-03-04 12:08 UTC (permalink / raw)
  To: b.a.t.m.a.n

As the kernel doc describes too the code is supposed to skip adding
multicast TT entries if both the WANT_ALL_IPV4 and WANT_ALL_IPV6 flags
are present.

Unfortunately, the current code even skips adding multicast TT entries
if only either the WANT_ALL_IPV4 or WANT_ALL_IPV6 is present.

This could lead to IPv6 multicast packet loss if only an IGMP but not an
MLD querier is present for instance or vice versa.

Fixes: 391b59cdb111 ("batman-adv: Add multicast optimization support for bridged setups")
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
---
v3: Added "Fixes:" line
v2: Fixed typo in last sentence: "non" -> "not"

 net/batman-adv/multicast.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c
index 6eaffe50..15a7b314 100644
--- a/net/batman-adv/multicast.c
+++ b/net/batman-adv/multicast.c
@@ -543,8 +543,8 @@ static bool batadv_mcast_mla_tvlv_update(struct batadv_priv *bat_priv)
 		bat_priv->mcast.enabled = true;
 	}
 
-	return !(mcast_data.flags &
-		 (BATADV_MCAST_WANT_ALL_IPV4 | BATADV_MCAST_WANT_ALL_IPV6));
+	return !(mcast_data.flags & BATADV_MCAST_WANT_ALL_IPV4 &&
+		 mcast_data.flags & BATADV_MCAST_WANT_ALL_IPV6);
 }
 
 /**
-- 
2.11.0


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

* Re: [B.A.T.M.A.N.] [PATCH maint v3] batman-adv: Fix multicast packet loss with a single WANT_ALL_IPV4/6 flag
  2018-03-04 12:08 [B.A.T.M.A.N.] [PATCH maint v3] batman-adv: Fix multicast packet loss with a single WANT_ALL_IPV4/6 flag Linus Lüssing
@ 2018-03-04 12:47 ` Sven Eckelmann
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Eckelmann @ 2018-03-04 12:47 UTC (permalink / raw)
  To: b.a.t.m.a.n

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

On Sonntag, 4. März 2018 13:08:17 CET Linus Lüssing wrote:
> As the kernel doc describes too the code is supposed to skip adding
> multicast TT entries if both the WANT_ALL_IPV4 and WANT_ALL_IPV6 flags
> are present.
> 
> Unfortunately, the current code even skips adding multicast TT entries
> if only either the WANT_ALL_IPV4 or WANT_ALL_IPV6 is present.
> 
> This could lead to IPv6 multicast packet loss if only an IGMP but not an
> MLD querier is present for instance or vice versa.
> 
> Fixes: 391b59cdb111 ("batman-adv: Add multicast optimization support for bridged setups")
> Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>

Applied in edba00d56efb [1].

Thanks,
	Sven

[1] https://git.open-mesh.org/batman-adv.git/commit/edba00d56efb1d55cdd40957e010fba80580b5e2

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

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

end of thread, other threads:[~2018-03-04 12:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-04 12:08 [B.A.T.M.A.N.] [PATCH maint v3] batman-adv: Fix multicast packet loss with a single WANT_ALL_IPV4/6 flag Linus Lüssing
2018-03-04 12:47 ` Sven Eckelmann

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).