aboutsummaryrefslogtreecommitdiff
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-01-28 17:11:43 +0100
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:19:09 -0500
commit7d185b8bb17eac9e9d673eb483ded0fbf0b28b97 (patch)
tree5f8e56ddebccb2a97a2a99be53c2838472026f0b /net/mac80211/tx.c
parentb22052569657925d6de33b19b2c7b7562900defb (diff)
mac80211: allow sending multicast frames through virtual ports
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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 67b509edd43..85d01646abf 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1409,10 +1409,17 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
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 */
@@ -1422,10 +1429,12 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
}
/*
- * 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,