Merge branch 'bugfix/ignore_pmf_capable_flag' into 'master'

Always connect Station in PMF mode if possible

Closes WIFI-4320

See merge request espressif/esp-idf!17023
This commit is contained in:
Jiang Jiang Jian 2022-03-03 19:34:36 +08:00
commit 1068c7720b
9 changed files with 3 additions and 33 deletions

View File

@ -215,7 +215,7 @@ typedef enum {
/** Configuration structure for Protected Management Frame */
typedef struct {
bool capable; /**< Device will always connect in PMF mode if other device also advertizes PMF capability. */
bool capable; /**< Deprecated variable. Device will always connect in PMF mode if other device also advertizes PMF capability. */
bool required; /**< Advertizes that Protected Management Frame is required. Device will not associate to non-PMF capable devices. */
} wifi_pmf_config_t;

@ -1 +1 @@
Subproject commit d464572fa5be0b6508cdb6a93124f9ea72280225
Subproject commit 81768e63548385be79e7b35828832a53faba4393

View File

@ -190,7 +190,6 @@ static int esp_dpp_handle_config_obj(struct dpp_authentication *auth,
os_memcpy(wifi_cfg->sta.password, conf->passphrase,
sizeof(wifi_cfg->sta.password));
if (conf->akm == DPP_AKM_PSK_SAE) {
wifi_cfg->sta.pmf_cfg.capable = true;
wifi_cfg->sta.pmf_cfg.required = true;
}
}

View File

@ -123,11 +123,6 @@ void wifi_init_sta(void)
* However these modes are deprecated and not advisable to be used. Incase your Access point
* doesn't support WPA2, these mode can be enabled by commenting below line */
.threshold.authmode = WIFI_AUTH_WPA2_PSK,
.pmf_cfg = {
.capable = true,
.required = false
},
},
};
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) );

View File

@ -141,11 +141,6 @@ void wifi_init_sta(void)
* However these modes are deprecated and not advisable to be used. Incase your Access point
* doesn't support WPA2, these mode can be enabled by commenting below line */
.threshold.authmode = WIFI_AUTH_WPA2_PSK,
.pmf_cfg = {
.capable = true,
.required = false
},
},
};
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) );

View File

@ -96,11 +96,6 @@ void wifi_init_sta(void)
* However these modes are deprecated and not advisable to be used. Incase your Access point
* doesn't support WPA2, these mode can be enabled by commenting below line */
.threshold.authmode = WIFI_AUTH_WPA2_PSK,
.pmf_cfg = {
.capable = true,
.required = false
},
},
};
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) );

View File

@ -161,7 +161,6 @@ static bool wifi_cmd_sta_join(const char *ssid, const char *pass)
int bits = xEventGroupWaitBits(wifi_event_group, CONNECTED_BIT, 0, 1, 0);
wifi_config_t wifi_config = { 0 };
wifi_config.sta.pmf_cfg.capable = true;
strlcpy((char *) wifi_config.sta.ssid, ssid, sizeof(wifi_config.sta.ssid));
if (pass) {

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: CC0-1.0
*/
@ -89,12 +89,6 @@ static void initialise_wifi(void)
wifi_config_t wifi_config = {
.sta = {
.ssid = EXAMPLE_WIFI_SSID,
#if defined(CONFIG_EXAMPLE_WPA3_ENTERPRISE)
.pmf_cfg = {
.capable = true,
.required = false
},
#endif
},
};
ESP_LOGI(TAG, "Setting WiFi configuration SSID %s...", wifi_config.sta.ssid);

View File

@ -122,15 +122,8 @@ static void initialise_wifi(void)
wifi_config_t wifi_config = {
.sta = {
.ssid = EXAMPLE_WIFI_SSID,
#if defined(CONFIG_EXAMPLE_WPA3_ENTERPRISE)
.pmf_cfg = {
.capable = true,
.required = false
},
#endif
#if defined (CONFIG_EXAMPLE_WPA3_192BIT_ENTERPRISE)
.pmf_cfg = {
.capable = true,
.required = true
},
#endif