571c907e9c9fc7dfcd4700d9fe6063e651728ad7
[feed/routing.git] / batman-adv / patches / 0035-batman-adv-fix-multicast-via-unicast-transmission-wi.patch
1 From: Linus Lüssing <linus.luessing@c0d3.blue>
2 Date: Tue, 20 Mar 2018 03:13:27 +0100
3 Subject: batman-adv: fix multicast-via-unicast transmission with AP isolation
4
5 For multicast frames AP isolation is only supposed to be checked on
6 the receiving nodes and never on the originating one.
7
8 Furthermore, the isolation or wifi flag bits should only be intepreted
9 as such for unicast and never multicast TT entries.
10
11 By injecting flags to the multicast TT entry claimed by a single
12 target node it was verified in tests that this multicast address
13 becomes unreachable, leading to packet loss.
14
15 Omitting the "src" parameter to the batadv_transtable_search() call
16 successfully skipped the AP isolation check and made the target
17 reachable again.
18
19 Fixes: 405cc1e5a81e ("batman-adv: Modified forwarding behaviour for multicast packets")
20 Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
21 Signed-off-by: Sven Eckelmann <sven@narfation.org>
22
23 Origin: upstream, https://git.open-mesh.org/batman-adv.git/commit/67a50c93bceb534937d6a188eded79272ff6d55d
24
25 diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c
26 index 1fb4f87be11e984f3a839c0b2dea939cd692b04d..20680e1dafc46cd60766a6dcd4f401f097ad4786 100644
27 --- a/net/batman-adv/multicast.c
28 +++ b/net/batman-adv/multicast.c
29 @@ -811,8 +811,8 @@ static struct batadv_orig_node *
30 batadv_mcast_forw_tt_node_get(struct batadv_priv *bat_priv,
31 struct ethhdr *ethhdr)
32 {
33 - return batadv_transtable_search(bat_priv, ethhdr->h_source,
34 - ethhdr->h_dest, BATADV_NO_FLAGS);
35 + return batadv_transtable_search(bat_priv, NULL, ethhdr->h_dest,
36 + BATADV_NO_FLAGS);
37 }
38
39 /**