]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Ignore Management frames while AP interface is not fully enabled
authorJouni Malinen <j@w1.fi>
Sat, 16 May 2020 09:16:34 +0000 (12:16 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 16 May 2020 09:16:34 +0000 (12:16 +0300)
It is possible for drivers to report received Management frames while AP
is going through initial setup (e.g., during ACS or DFS CAC). hostapd
and the driver is not yet ready for actually sending out responses to
such frames at this point and as such, it is better to explicitly ignore
such received frames rather than try to process them and have the
response (e.g., a Probe Response frame) getting dropped by the driver as
an invalid or getting out with some incorrect information.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/ieee802_11.c

index 15e44b91254fd7d345a4f0d7657331bd253dc72e..3e1896cf1c62c63828bba301824a1bd5b2975c53 100644 (file)
@@ -4858,6 +4858,11 @@ int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
                return 0;
        }
 
+       if (hapd->iface->state != HAPD_IFACE_ENABLED) {
+               wpa_printf(MSG_DEBUG, "MGMT: Ignore management frame while interface is not enabled (SA=" MACSTR " DA=" MACSTR " subtype=%u)",
+                          MAC2STR(mgmt->sa), MAC2STR(mgmt->da), stype);
+               return 1;
+       }
 
        if (stype == WLAN_FC_STYPE_PROBE_REQ) {
                handle_probe_req(hapd, mgmt, len, ssi_signal);