Commit a8d15ff0 authored by Johannes Berg's avatar Johannes Berg

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: default avatarJohannes Berg <johannes.berg@intel.com>
parent 5041006c
...@@ -1842,6 +1842,9 @@ static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata, ...@@ -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); authorized = test_sta_flag(sta, WLAN_STA_AUTHORIZED);
wme_sta = sta->sta.wme; wme_sta = sta->sta.wme;
have_station = true; have_station = true;
} else if (sdata->wdev.use_4addr) {
ret = -ENOLINK;
goto free;
} }
ap_sdata = container_of(sdata->bss, struct ieee80211_sub_if_data, ap_sdata = container_of(sdata->bss, struct ieee80211_sub_if_data,
u.ap); u.ap);
......
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