]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
MBO/OCE: Update disable_mbo_oce flag after association
authorAnkita Bajaj <bankita@codeaurora.org>
Fri, 27 Sep 2019 05:58:34 +0000 (11:28 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 1 Oct 2019 13:45:15 +0000 (16:45 +0300)
After roaming to an AP, update disable_mbo_oce flag based on the current
BSS capabilities. This flag is used to check whether STA should support
MBO/OCE features and process BTM request received from the current
connected AP.

When a STA roams from a WPA2 MBO/OCE AP with PMF enabled to a
misbehaving WPA2 MBO/OCE AP without PMF, or if the driver chooses a BSS
in which PMF is not enabled for the initial connection, BTM requests
from such APs should not be processed by STA.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
wpa_supplicant/events.c

index ba9a5ac2e432d434e9522871bf9e687b16964b35..1a2fcd26c102d0cc1669449c43c3a7ee297315db 100644 (file)
@@ -2728,6 +2728,9 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
        u8 bssid[ETH_ALEN];
        int ft_completed, already_authorized;
        int new_bss = 0;
+#if defined(CONFIG_FILS) || defined(CONFIG_MBO)
+       struct wpa_bss *bss;
+#endif /* CONFIG_FILS || CONFIG_MBO */
 
 #ifdef CONFIG_AP
        if (wpa_s->ap_iface) {
@@ -2951,15 +2954,21 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
                        wmm_ac_restore_tspecs(wpa_s);
        }
 
+#if defined(CONFIG_FILS) || defined(CONFIG_MBO)
+       bss = wpa_bss_get_bssid(wpa_s, bssid);
+#endif /* CONFIG_FILS || CONFIG_MBO */
 #ifdef CONFIG_FILS
        if (wpa_key_mgmt_fils(wpa_s->key_mgmt)) {
-               struct wpa_bss *bss = wpa_bss_get_bssid(wpa_s, bssid);
                const u8 *fils_cache_id = wpa_bss_get_fils_cache_id(bss);
 
                if (fils_cache_id)
                        wpa_sm_set_fils_cache_id(wpa_s->wpa, fils_cache_id);
        }
 #endif /* CONFIG_FILS */
+
+#ifdef CONFIG_MBO
+       wpas_mbo_check_pmf(wpa_s, bss, wpa_s->current_ssid);
+#endif /* CONFIG_MBO */
 }