]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
mac80211: mesh: drop frames appearing to be from us
authorJohannes Berg <johannes.berg@intel.com>
Thu, 4 Jan 2018 14:51:53 +0000 (15:51 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 4 Jan 2018 14:51:53 +0000 (15:51 +0100)
If there are multiple mesh stations with the same MAC address,
they will both get confused and start throwing warnings.

Obviously in this case nothing can actually work anyway, so just
drop frames that look like they're from ourselves early on.

Reported-by: Gui Iribarren <gui@altermundi.net>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/rx.c

index 70e9d2ca8bbec176edac094268247bb125e3cbdc..4daafb07602f5f9727af7bec4ea7603901438b63 100644 (file)
@@ -3632,6 +3632,8 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx)
                }
                return true;
        case NL80211_IFTYPE_MESH_POINT:
+               if (ether_addr_equal(sdata->vif.addr, hdr->addr2))
+                       return false;
                if (multicast)
                        return true;
                return ether_addr_equal(sdata->vif.addr, hdr->addr1);