aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-04-29 09:44:16 -0400
committerLuis Henriques <luis.henriques@canonical.com>2012-05-25 12:24:41 -0400
commit40cce8ca73a69043fb15523eae14cbc1b3f191a6 (patch)
tree6cecadc3e5cf88f5cefd331cc46eb8970bf7012a
parenteef52df52031ca61c9750aac475e894d7f37134b (diff)
mac80211: fix AP mode EAP tx for VLAN stations
BugLink: http://bugs.launchpad.net/bugs/996109 commit 66f2c99af3d6f2d0aa1120884cf1c60613ef61c0 upstream. 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> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/mac80211/tx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 3104c844b54..da878c14182 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1222,7 +1222,8 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
1222 tx->sta = rcu_dereference(sdata->u.vlan.sta); 1222 tx->sta = rcu_dereference(sdata->u.vlan.sta);
1223 if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr) 1223 if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr)
1224 return TX_DROP; 1224 return TX_DROP;
1225 } else if (info->flags & IEEE80211_TX_CTL_INJECTED) { 1225 } else if (info->flags & IEEE80211_TX_CTL_INJECTED ||
1226 tx->sdata->control_port_protocol == tx->skb->protocol) {
1226 tx->sta = sta_info_get_bss(sdata, hdr->addr1); 1227 tx->sta = sta_info_get_bss(sdata, hdr->addr1);
1227 } 1228 }
1228 if (!tx->sta) 1229 if (!tx->sta)