]> git.hungrycats.org Git - linux/commitdiff
mac80211: restrict to AP in outgoing interface heuristic
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 5 Feb 2009 23:27:32 +0000 (00:27 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 Feb 2009 17:28:45 +0000 (09:28 -0800)
commit f1b33cb1c25ac476cbf22783f9ca2016f99648ed upstream.

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.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/mac80211/tx.c

index 077be80c842048d14f8149846a1d33a36132d0f8..e24ae1b5e64ee9e0274f27207774ab149a67ccb3 100644 (file)
@@ -1335,6 +1335,8 @@ int ieee80211_master_start_xmit(struct sk_buff *skb, struct net_device *dev)
                                                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);