[PATCH] WPS: Use shorter authentication timeout during no-SelReg iteration for PBC mode

Michael Olbrich m.olbrich at pengutronix.de
Thu Apr 12 02:48:29 PDT 2018


5add4101626b23c11f073630770896465d9cc8f3 ('WPS: Use shorter authentication
timeout during no-SelReg iteration') introduced the shorter timeout for PIN
mode.
A shorter timeout in PBC mode is useful for P2P. This allows authentication
retries after lost packages, before the group formation times out.

Signed-off-by: Michael Olbrich <m.olbrich at pengutronix.de>
---

I'm not sure if this is the correct fix. I want to avoid the 70 seconds
timeout for P2P and this seemed the cleanest way to achieve this.

Michael

 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 2c5d83cb2a84..1b4d45fe9e77 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -3920,7 +3920,8 @@ void wpa_supplicant_rx_eapol(void *ctx, const u8 *src_addr,
 #ifdef CONFIG_WPS
 		if (wpa_s->current_ssid && wpa_s->current_bss &&
 		    (wpa_s->current_ssid->key_mgmt & WPA_KEY_MGMT_WPS) &&
-		    eap_is_wps_pin_enrollee(&wpa_s->current_ssid->eap)) {
+		    (eap_is_wps_pbc_enrollee(&wpa_s->current_ssid->eap) ||
+		     eap_is_wps_pin_enrollee(&wpa_s->current_ssid->eap))) {
 			/*
 			 * Use shorter timeout if going through WPS AP iteration
 			 * for PIN config method with an AP that does not
-- 
2.16.1




More information about the Hostap mailing list