diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-04-29 09:44:16 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-30 14:40:05 -0400 |
commit | 66f2c99af3d6f2d0aa1120884cf1c60613ef61c0 (patch) | |
tree | 97742b014e6e85aabc03d84e7604ebf557d6a438 /net/mac80211 | |
parent | 4c1bcdb5a3354b250b82a67549f57ac27a3bb85f (diff) |
mac80211: fix AP mode EAP tx for VLAN stations
EAP frames for stations in an AP VLAN are sent on the main AP interface
to avoid race conditions wrt. moving stations.
For that to work properly, sta_info_get_bss must be used instead of
sta_info_get when sending EAP packets.
Previously this was only done for cooked monitor injected packets, so
this patch adds a check for tx->skb->protocol to the same place.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/tx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 782a60198df4..e76facc69e95 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1158,7 +1158,8 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata, | |||
1158 | tx->sta = rcu_dereference(sdata->u.vlan.sta); | 1158 | tx->sta = rcu_dereference(sdata->u.vlan.sta); |
1159 | if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr) | 1159 | if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr) |
1160 | return TX_DROP; | 1160 | return TX_DROP; |
1161 | } else if (info->flags & IEEE80211_TX_CTL_INJECTED) { | 1161 | } else if (info->flags & IEEE80211_TX_CTL_INJECTED || |
1162 | tx->sdata->control_port_protocol == tx->skb->protocol) { | ||
1162 | tx->sta = sta_info_get_bss(sdata, hdr->addr1); | 1163 | tx->sta = sta_info_get_bss(sdata, hdr->addr1); |
1163 | } | 1164 | } |
1164 | if (!tx->sta) | 1165 | if (!tx->sta) |