From: Jouni Malinen Date: Sun, 18 Dec 2022 18:32:23 +0000 (+0200) Subject: Force MFPR=1 to be used on the 6 GHz band X-Git-Tag: hostap_2_11~1360 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=546debd5efef4e44715b46a416e48d4e03d211d5;p=thirdparty%2Fhostap.git Force MFPR=1 to be used on the 6 GHz band IEEE Std 802.11ax-2021, 12.12.2 requires this, so force MFPR=1 when associating on the 6 GHz band so that ieee80211w=1 (i.e., MFPC=1 MFPR=0) configuration can be used to get MFPC=1 behavior on other bands and MFPR=1 on the 6 GHz band. Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index c17b67aac..5abed88c0 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -1899,7 +1899,8 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s, wpa_sm_set_param(wpa_s->wpa, WPA_PARAM_GROUP, wpa_s->group_cipher); if (!(ie.capabilities & WPA_CAPABILITY_MFPC) && - wpas_get_ssid_pmf(wpa_s, ssid) == MGMT_FRAME_PROTECTION_REQUIRED) { + (wpas_get_ssid_pmf(wpa_s, ssid) == MGMT_FRAME_PROTECTION_REQUIRED || + (bss && is_6ghz_freq(bss->freq)))) { wpa_msg(wpa_s, MSG_INFO, "RSN: Management frame protection required but the selected AP does not enable it"); return -1; @@ -1932,6 +1933,12 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s, (!ssid->sae_password && ssid->passphrase && sae_pk_valid_password(ssid->passphrase)))); #endif /* CONFIG_SAE_PK */ + if (bss && is_6ghz_freq(bss->freq) && + wpas_get_ssid_pmf(wpa_s, ssid) != MGMT_FRAME_PROTECTION_REQUIRED) { + wpa_dbg(wpa_s, MSG_DEBUG, "RSN: Force MFPR=1 on 6 GHz"); + wpa_sm_set_param(wpa_s->wpa, WPA_PARAM_MFP, + MGMT_FRAME_PROTECTION_REQUIRED); + } #ifdef CONFIG_TESTING_OPTIONS wpa_sm_set_param(wpa_s->wpa, WPA_PARAM_FT_RSNXE_USED, wpa_s->ft_rsnxe_used);