Skip to content

Commit 5f8156f

Browse files
T-Xgregkh
authored andcommitted
batman-adv: Fix multicast packet loss with a single WANT_ALL_IPV4/6 flag
[ Upstream commit 74c12c6 ] 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: 687937a ("batman-adv: Add multicast optimization support for bridged setups") Signed-off-by: Linus Lüssing <[email protected]> Signed-off-by: Sven Eckelmann <[email protected]> Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 73ecd80 commit 5f8156f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/batman-adv/multicast.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,8 @@ static bool batadv_mcast_mla_tvlv_update(struct batadv_priv *bat_priv)
540540
bat_priv->mcast.enabled = true;
541541
}
542542

543-
return !(mcast_data.flags &
544-
(BATADV_MCAST_WANT_ALL_IPV4 | BATADV_MCAST_WANT_ALL_IPV6));
543+
return !(mcast_data.flags & BATADV_MCAST_WANT_ALL_IPV4 &&
544+
mcast_data.flags & BATADV_MCAST_WANT_ALL_IPV6);
545545
}
546546

547547
/**

0 commit comments

Comments
 (0)