Skip to contentSkip to conversation

mac80211: restrict to AP in outgoing interface heuristic

PATCH New Johannes Berg 1 participant 1 message Feb 5, 2009 mac80211

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 mac80211: restrict to AP in outgoing interface heuristic

We try to find the correct outgoing interface for injected frames based on the TA, but since this is a hack for hostapd 11w, restrict the heuristic to AP mode interfaces. At some point we'll add the ability to give an interface index in radiotap or so and just remove this heuristic again.

---
Otherwise we end up passing the monitor vif pointer to drivers, which may cause them to crash.

 net/mac80211/tx.c |    2 ++
 1 file changed, 2 insertions(+)
net/mac80211/tx.c +2 -0
@@ -1394,6 +1394,8 @@ int ieee80211_master_start_xmit(struct s
 						list) {
 				if (!netif_running(sdata->dev))
 					continue;
+				if (sdata->vif.type != NL80211_IFTYPE_AP)
+					continue;
 				if (compare_ether_addr(sdata->dev->dev_addr,
 						       hdr->addr2)) {
 					dev_hold(sdata->dev);