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

This commit is contained in:
Sarvesh Bodakhe
2023-08-11 16:06:21 +05:30
parent 8d2dbd461f
commit 2791508094
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);