From c3491740359004d801d2d433fbeb909d305d06dd Mon Sep 17 00:00:00 2001 From: Ankita Bajaj Date: Fri, 27 Sep 2019 11:28:34 +0530 Subject: [PATCH] MBO/OCE: Update disable_mbo_oce flag after association 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 --- wpa_supplicant/events.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index ba9a5ac2e..1a2fcd26c 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -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 */ }