Search Linux Wireless

Re: oops on cloned-mac 802.11s stations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2017-12-18 at 03:44 +0100, Gui Iribarren wrote:
> Steps to reproduce:
> join a 802.11s mesh with a nodeA, and then join the same 802.11s mesh
> with another nodeB, so that both nodes MAC addresses are exactly the
> same (i.e. nodeB is "cloning" nodeA MAC)
> 
> Expected result:
> nodeA and nodeB coexist in a conflicting state, silently
> (not saying that this is a desired scenario, of course; just came across
> this while testing radios that accidentally had the same (fake) address.
> the warning might ring a bell to someone, so reporting it here just for
> the record)
> 
> What actually happens:
> both on nodeA and nodeB, the log is flooded with these warnings:

That's hardly an "oops", but yeah, not nice.

Somewhere we should drop packets if they appear to come from ourselves.
Perhaps like this:

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index b3cff69bfd66..fd580614085b 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -3625,6 +3625,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);

johannes



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux