mac80211: mesh: drop frames appearing to be from us
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 323-mac80211-mesh-drop-frames-appearing-to-be-from-us.patch
1 From: Johannes Berg <johannes.berg@intel.com>
2 Date: Thu, 4 Jan 2018 15:51:53 +0100
3 Subject: [PATCH] mac80211: mesh: drop frames appearing to be from us
4
5 If there are multiple mesh stations with the same MAC address,
6 they will both get confused and start throwing warnings.
7
8 Obviously in this case nothing can actually work anyway, so just
9 drop frames that look like they're from ourselves early on.
10
11 Reported-by: Gui Iribarren <gui@altermundi.net>
12 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 ---
14
15 --- a/net/mac80211/rx.c
16 +++ b/net/mac80211/rx.c
17 @@ -3632,6 +3632,8 @@ static bool ieee80211_accept_frame(struc
18 }
19 return true;
20 case NL80211_IFTYPE_MESH_POINT:
21 + if (ether_addr_equal(sdata->vif.addr, hdr->addr2))
22 + return false;
23 if (multicast)
24 return true;
25 return ether_addr_equal(sdata->vif.addr, hdr->addr1);