diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2010-11-26 20:41:55 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-29 14:41:28 -0500 |
commit | 7dff3125534c1d035a910052335a3a39fbb31aa7 (patch) | |
tree | 533142aacfc3d49067449173fb006225f41bc459 /net | |
parent | 46047784b8cdcfc916f6c1cccee0c18dd1223dfd (diff) | |
download | blackbird-op-linux-7dff3125534c1d035a910052335a3a39fbb31aa7.tar.gz blackbird-op-linux-7dff3125534c1d035a910052335a3a39fbb31aa7.zip |
mac80211: Fix frame injection using non-AP vif
In order for frame injection to work properly for some use cases
(e.g., finding the station entry and keys for encryption), mac80211
needs to find the correct sdata entry. This works when the main vif
is in AP mode, but commit a2c1e3dad516618cb0fbfb1a62c36d0b0744573a
broke this particular use case for station main vif. While this type of
injection is quite unusual operation, it has some uses and we should fix
it. Do this by changing the monitor vif sdata selection to allow station
vif to be selected instead of limiting it to just AP vifs. We still need
to skip some iftypes to avoid selecting unsuitable vif for injection.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/tx.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 96c594309506..df6aac523532 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1587,7 +1587,12 @@ static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata, list) { if (!ieee80211_sdata_running(tmp_sdata)) continue; - if (tmp_sdata->vif.type != NL80211_IFTYPE_AP) + if (tmp_sdata->vif.type == + NL80211_IFTYPE_MONITOR || + tmp_sdata->vif.type == + NL80211_IFTYPE_AP_VLAN || + tmp_sdata->vif.type == + NL80211_IFTYPE_WDS) continue; if (compare_ether_addr(tmp_sdata->vif.addr, hdr->addr2) == 0) { |