[PATCH] WPS: reset ClientTimeout to 30 seconds in eap_wsc_init

Jason Young a.young.jason at gmail.com
Mon Dec 20 15:40:42 EST 2010


Commit 9301f651 reduces ClientTimeout from 30 seconds to 2 seconds
whenever provisioning step has been completed (either successfully or
unsuccessfully). Subsequent attempts to complete provisioning may
prematurely timeout and fail because ClientTimeout is never reset back
to 30 seconds.
---

I was trying to use P2P on two embedded devices under heavy system load.
The initial P2P connection attempt always succeeded but subsequent
attempts to re-run the protocol were failing during WPS provisioning because
of an EAP-Failure on the STA immediately after the STA sent M1. I was able
to reproduce the same problem on the STA if I used hostapd/wpa_supplicant
with WPS instead of P2P.

 src/eap_peer/eap_wsc.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/eap_peer/eap_wsc.c b/src/eap_peer/eap_wsc.c
index 09d8a1c..2c53b58 100644
--- a/src/eap_peer/eap_wsc.c
+++ b/src/eap_peer/eap_wsc.c
@@ -237,8 +237,7 @@ static void * eap_wsc_init(struct eap_sm *sm)
        }

        /* Use reduced client timeout for WPS to avoid long wait */
-       if (sm->ClientTimeout > 30)
-               sm->ClientTimeout = 30;
+       sm->ClientTimeout = 30;

        return data;
 }
--


More information about the HostAP mailing list