Commit 7dff3125 authored by Jouni Malinen's avatar Jouni Malinen Committed by John W. Linville

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 a2c1e3da
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: default avatarJouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 46047784
...@@ -1587,7 +1587,12 @@ static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata, ...@@ -1587,7 +1587,12 @@ static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata,
list) { list) {
if (!ieee80211_sdata_running(tmp_sdata)) if (!ieee80211_sdata_running(tmp_sdata))
continue; 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; continue;
if (compare_ether_addr(tmp_sdata->vif.addr, if (compare_ether_addr(tmp_sdata->vif.addr,
hdr->addr2) == 0) { hdr->addr2) == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment