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 <jouni@codeaurora.org>
This commit is contained in:
Ankita Bajaj 2019-09-27 11:28:34 +05:30 committed by Jouni Malinen
parent cefcbcdba4
commit c349174035

View file

@ -2728,6 +2728,9 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
u8 bssid[ETH_ALEN]; u8 bssid[ETH_ALEN];
int ft_completed, already_authorized; int ft_completed, already_authorized;
int new_bss = 0; int new_bss = 0;
#if defined(CONFIG_FILS) || defined(CONFIG_MBO)
struct wpa_bss *bss;
#endif /* CONFIG_FILS || CONFIG_MBO */
#ifdef CONFIG_AP #ifdef CONFIG_AP
if (wpa_s->ap_iface) { 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); 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 #ifdef CONFIG_FILS
if (wpa_key_mgmt_fils(wpa_s->key_mgmt)) { 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); const u8 *fils_cache_id = wpa_bss_get_fils_cache_id(bss);
if (fils_cache_id) if (fils_cache_id)
wpa_sm_set_fils_cache_id(wpa_s->wpa, fils_cache_id); wpa_sm_set_fils_cache_id(wpa_s->wpa, fils_cache_id);
} }
#endif /* CONFIG_FILS */ #endif /* CONFIG_FILS */
#ifdef CONFIG_MBO
wpas_mbo_check_pmf(wpa_s, bss, wpa_s->current_ssid);
#endif /* CONFIG_MBO */
} }