From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] mac80211: allow sending multicast frames through virtual ports
Date: Mon, 28 Jan 2008 17:11:43 +0100 [thread overview]
Message-ID: <1201536703.9397.14.camel@johannes.berg> (raw)
When reworking the port access control code, I forgot multicast frames
and those are now always rejected because the destination station is
not known. This changes the code to allow through multicast frames and
also avoid the sta hash lookup (which is bound to fail) for them.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
Even though this is a fix, there's no need to apply this patch to
non-development kernels, the problem cannot trigger unless you're
in master mode which isn't supported yet.
net/mac80211/tx.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
--- everything.orig/net/mac80211/tx.c 2008-01-25 13:39:39.446496582 +0100
+++ everything/net/mac80211/tx.c 2008-01-25 13:43:11.856498535 +0100
@@ -1449,10 +1449,17 @@ int ieee80211_subif_start_xmit(struct sk
goto fail;
}
- sta = sta_info_get(local, hdr.addr1);
- if (sta) {
- sta_flags = sta->flags;
- sta_info_put(sta);
+ /*
+ * There's no need to try to look up the destination
+ * if it is a multicast address (which can only happen
+ * in AP mode)
+ */
+ if (!is_multicast_ether_addr(hdr.addr1)) {
+ sta = sta_info_get(local, hdr.addr1);
+ if (sta) {
+ sta_flags = sta->flags;
+ sta_info_put(sta);
+ }
}
/* receiver is QoS enabled, use a QoS type frame */
@@ -1462,10 +1469,12 @@ int ieee80211_subif_start_xmit(struct sk
}
/*
- * If port access control is enabled, drop frames to unauthorised
- * stations unless they are EAPOL frames from the local station.
+ * If port access control is enabled, drop unicast frames to
+ * unauthorised stations unless they are EAPOL frames from the
+ * local station.
*/
if (unlikely(sdata->ieee802_1x_pac &&
+ !is_multicast_ether_addr(hdr.addr1) &&
!(sta_flags & WLAN_STA_AUTHORIZED) &&
!(ethertype == ETH_P_PAE &&
compare_ether_addr(dev->dev_addr,
reply other threads:[~2008-01-29 11:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1201536703.9397.14.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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