aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-01-08 12:15:13 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-01-12 14:02:08 -0500
commit3f0e0b220f80075ce15483b20458192c0ac27426 (patch)
tree3e443253f6f96b71b1ee2013cdef5b0d930efb0a /net/mac80211
parent0e5ded5a87c097760abd68521b86f1025dedc7d7 (diff)
mac80211: do not transmit frames on unconfigured 4-addr vlan interfaces
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> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-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 0661e696a1dd..47ca59e52e71 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1056,8 +1056,11 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
1056 1056
1057 hdr = (struct ieee80211_hdr *) skb->data; 1057 hdr = (struct ieee80211_hdr *) skb->data;
1058 1058
1059 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) 1059 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) {
1060 tx->sta = rcu_dereference(sdata->u.vlan.sta); 1060 tx->sta = rcu_dereference(sdata->u.vlan.sta);
1061 if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr)
1062 return TX_DROP;
1063 }
1061 if (!tx->sta) 1064 if (!tx->sta)
1062 tx->sta = sta_info_get(sdata, hdr->addr1); 1065 tx->sta = sta_info_get(sdata, hdr->addr1);
1063 1066