From 32dcec9529ec25bc80188b05abf806450d0fde10 Mon Sep 17 00:00:00 2001 From: Veerendranath Jakkam Date: Tue, 29 Aug 2023 00:04:45 +0530 Subject: [PATCH] Send actual MFP configuration when driver takes care of BSS selection Send the actual MFP configuration value to the driver instead of overriding it with MFP required based on the wpa_supplicant selected BSS when the driver takes care of BSS selection. This is needed to allow the driver to know whether it can select an MFP disabled BSS. Signed-off-by: Veerendranath Jakkam --- wpa_supplicant/wpa_supplicant.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index e712c8154..94f549b6e 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -4292,7 +4292,8 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit) if (params.mgmt_frame_protection != NO_MGMT_FRAME_PROTECTION && bss) { const u8 *rsn = wpa_bss_get_ie(bss, WLAN_EID_RSN); struct wpa_ie_data ie; - if (rsn && wpa_parse_wpa_ie(rsn, 2 + rsn[1], &ie) == 0 && + if (!wpas_driver_bss_selection(wpa_s) && rsn && + wpa_parse_wpa_ie(rsn, 2 + rsn[1], &ie) == 0 && ie.capabilities & (WPA_CAPABILITY_MFPC | WPA_CAPABILITY_MFPR)) { wpa_dbg(wpa_s, MSG_DEBUG, "WPA: Selected AP supports "