Merge branch 'fix/wifi_wps_pbc_overlap' into 'master'

fix(wpa_supplicant): Add support to detect  PBC overlap in wps registrar mode

Closes WIFIBUG-56

See merge request espressif/esp-idf!25331
This commit is contained in:
Jiang Jiang Jian
2023-08-21 14:49:24 +08:00
3 changed files with 24 additions and 0 deletions

View File

@@ -38,6 +38,7 @@
#include "ap/ieee802_1x.h"
#include "ap/sta_info.h"
#include "wps/wps_defs.h"
#include "wps/wps.h"
const wifi_osi_funcs_t *wifi_funcs;
struct wpa_funcs *wpa_cb;
@@ -280,6 +281,13 @@ static int check_n_add_wps_sta(struct hostapd_data *hapd, struct sta_info *sta_i
return 0;
}
if (wps_type == WPS_TYPE_PBC) {
if (esp_wps_registrar_check_pbc_overlap(hapd->wps)) {
wpa_printf(MSG_DEBUG, "WPS: PBC session overlap detected");
return -1;
}
}
sta_info->wps_ie = wps_ie;
sta_info->eapol_sm = ieee802_1x_alloc_eapol_sm(hapd, sta_info);