mac80211: use nullfunc frames for 4-addr sta detection
To detect incoming 4-addr stations, hostapd needs to receive a 4-addr data frame from the remote station, so that it can create the AP VLAN for it. With this patch, the mlme code emits a 4-addr nullfunc frame immediately after assoc. On the AP side it also drops 4-addr nullfunc frames to the cooked monitor mode interface, if the interface hasn't been fully set up to receive 4-addr data frames yet. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
199afd9d89
commit
d524215f6c
@@ -1111,6 +1111,18 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
|
||||
if (ieee80211_is_nullfunc(hdr->frame_control) ||
|
||||
ieee80211_is_qos_nullfunc(hdr->frame_control)) {
|
||||
I802_DEBUG_INC(rx->local->rx_handlers_drop_nullfunc);
|
||||
|
||||
/*
|
||||
* If we receive a 4-addr nullfunc frame from a STA
|
||||
* that was not moved to a 4-addr STA vlan yet, drop
|
||||
* the frame to the monitor interface, to make sure
|
||||
* that hostapd sees it
|
||||
*/
|
||||
if (ieee80211_has_a4(hdr->frame_control) &&
|
||||
(rx->sdata->vif.type == NL80211_IFTYPE_AP ||
|
||||
(rx->sdata->vif.type == NL80211_IFTYPE_AP_VLAN &&
|
||||
!rx->sdata->u.vlan.sta)))
|
||||
return RX_DROP_MONITOR;
|
||||
/*
|
||||
* Update counter and free packet here to avoid
|
||||
* counting this as a dropped packed.
|
||||
|
Reference in New Issue
Block a user