Skip to content

Commit

Permalink
batman-adv: Fix multicast packet loss with a single WANT_ALL_IPV4/6 flag
Browse files Browse the repository at this point in the history
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 <linus.luessing@c0d3.blue>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
  • Loading branch information
Linus Lüssing authored and Simon Wunderlich committed Mar 4, 2018
1 parent f22e089 commit 74c12c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/batman-adv/multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 74c12c6

Please sign in to comment.