batman-adv: Merge bugfixes from 2018.1
[feed/routing.git] / batman-adv / patches / 0031-batman-adv-Fix-multicast-packet-loss-with-a-single-W.patch
1 From: Linus Lüssing <linus.luessing@c0d3.blue>
2 Date: Sun, 4 Mar 2018 13:08:17 +0100
3 Subject: [PATCH] batman-adv: Fix multicast packet loss with a single WANT_ALL_IPV4/6 flag
4
5 As the kernel doc describes too the code is supposed to skip adding
6 multicast TT entries if both the WANT_ALL_IPV4 and WANT_ALL_IPV6 flags
7 are present.
8
9 Unfortunately, the current code even skips adding multicast TT entries
10 if only either the WANT_ALL_IPV4 or WANT_ALL_IPV6 is present.
11
12 This could lead to IPv6 multicast packet loss if only an IGMP but not an
13 MLD querier is present for instance or vice versa.
14
15 Fixes: 391b59cdb111 ("batman-adv: Add multicast optimization support for bridged setups")
16 Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
17 Signed-off-by: Sven Eckelmann <sven@narfation.org>
18
19 Origin: upstream, https://git.open-mesh.org/batman-adv.git/commit/edba00d56efb1d55cdd40957e010fba80580b5e2
20 ---
21 net/batman-adv/multicast.c | 4 ++--
22 1 file changed, 2 insertions(+), 2 deletions(-)
23
24 diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c
25 index 090a69fc342eac8a0b6bf89556d2b32523817d09..1fb4f87be11e984f3a839c0b2dea939cd692b04d 100644
26 --- a/net/batman-adv/multicast.c
27 +++ b/net/batman-adv/multicast.c
28 @@ -541,8 +541,8 @@ update:
29 bat_priv->mcast.enabled = true;
30 }
31
32 - return !(mcast_data.flags &
33 - (BATADV_MCAST_WANT_ALL_IPV4 | BATADV_MCAST_WANT_ALL_IPV6));
34 + return !(mcast_data.flags & BATADV_MCAST_WANT_ALL_IPV4 &&
35 + mcast_data.flags & BATADV_MCAST_WANT_ALL_IPV6);
36 }
37
38 /**