From 98de44389045622d03736386e1e18df119ac9a55 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 29 Dec 2008 18:50:37 +0200 Subject: [PATCH] WPS: Set recommended retransmission times with EAP method specific hint --- src/eap_server/eap_wsc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/eap_server/eap_wsc.c b/src/eap_server/eap_wsc.c index 626663635..892df702f 100644 --- a/src/eap_server/eap_wsc.c +++ b/src/eap_server/eap_wsc.c @@ -436,6 +436,15 @@ static Boolean eap_wsc_isSuccess(struct eap_sm *sm, void *priv) } +static int eap_wsc_getTimeout(struct eap_sm *sm, void *priv) +{ + /* Recommended retransmit times: retransmit timeout 5 seconds, + * per-message timeout 15 seconds, i.e., 3 tries. */ + sm->MaxRetrans = 2; /* total 3 attempts */ + return 5; +} + + int eap_server_wsc_register(void) { struct eap_method *eap; @@ -454,6 +463,7 @@ int eap_server_wsc_register(void) eap->process = eap_wsc_process; eap->isDone = eap_wsc_isDone; eap->isSuccess = eap_wsc_isSuccess; + eap->getTimeout = eap_wsc_getTimeout; ret = eap_server_method_register(eap); if (ret)