From: Johannes Berg <johannes@sipsolutions.net>
To: Gui Iribarren <gui@altermundi.net>, linux-wireless@vger.kernel.org
Subject: Re: oops on cloned-mac 802.11s stations
Date: Tue, 19 Dec 2017 11:05:38 +0100 [thread overview]
Message-ID: <1513677938.26145.12.camel@sipsolutions.net> (raw)
In-Reply-To: <39d50d91-ac83-611d-6709-021757686206@altermundi.net> (sfid-20171218_035222_838601_77D93FC5)
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
next prev parent reply other threads:[~2017-12-19 10:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-18 2:44 oops on cloned-mac 802.11s stations Gui Iribarren
2017-12-19 10:05 ` Johannes Berg [this message]
2017-12-22 18:34 ` Thomas Pedersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1513677938.26145.12.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=gui@altermundi.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).