aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-01-08 12:15:13 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-15 12:06:43 -0400
commit237ee1fee55bde35a68e0e0585a01ccd65345514 (patch)
tree3b3b2270a3be2273aaecb37f85a6da7c8887aa4f /net
parentb3d55121295829160c0271c4bc3eaba894390984 (diff)
mac80211: do not transmit frames on unconfigured 4-addr vlan interfaces
commit 3f0e0b220f80075ce15483b20458192c0ac27426 upstream. If frames are transmitted on 4-addr ap vlan interfaces with no station, they end up being transmitted unencrypted, even if the ap interface uses WPA. This patch add some sanity checking to make sure that this does not happen. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/tx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index ac210b586702..70c79c3013fa 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1052,8 +1052,11 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
1052 1052
1053 hdr = (struct ieee80211_hdr *) skb->data; 1053 hdr = (struct ieee80211_hdr *) skb->data;
1054 1054
1055 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) 1055 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) {
1056 tx->sta = rcu_dereference(sdata->u.vlan.sta); 1056 tx->sta = rcu_dereference(sdata->u.vlan.sta);
1057 if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr)
1058 return TX_DROP;
1059 }
1057 if (!tx->sta) 1060 if (!tx->sta)
1058 tx->sta = sta_info_get(local, hdr->addr1); 1061 tx->sta = sta_info_get(local, hdr->addr1);
1059 1062