summaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-03-20 14:05:02 +0100
committerJohannes Berg <johannes.berg@intel.com>2015-03-20 16:27:35 +0100
commita8d15ff0050aef96a14a185b5138f01f98109b40 (patch)
treeadd81839f1c62868aa1d83cbfd5d00940d3f50a9 /net/mac80211/tx.c
parent5041006c42537cce1d3619521f50c29b3bf0a633 (diff)
downloadop-kernel-dev-a8d15ff0050aef96a14a185b5138f01f98109b40.zip
op-kernel-dev-a8d15ff0050aef96a14a185b5138f01f98109b40.tar.gz
mac80211: drop 4-addr VLAN frames earlier if not connected
If there's no station on the 4-addr VLAN interface, then frames cannot be transmitted. Drop such frames earlier, before setting up all the information for them. We should keep the old check though since that code might be used for other internally-generated frames. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index dcf60ee..1d63446 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1842,6 +1842,9 @@ static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata,
authorized = test_sta_flag(sta, WLAN_STA_AUTHORIZED);
wme_sta = sta->sta.wme;
have_station = true;
+ } else if (sdata->wdev.use_4addr) {
+ ret = -ENOLINK;
+ goto free;
}
ap_sdata = container_of(sdata->bss, struct ieee80211_sub_if_data,
u.ap);
OpenPOWER on IntegriCloud