EAP server: Force FAILURE if EAP method buildReq fails

Previously, this resulted in unnecessary wait and retransmission of the
previous EAP-Request. Change that to trigger immediate transmission of
EAP-Failure and disconnection since the EAP method cannot really recover
from this state.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2015-07-19 16:29:29 +03:00
parent 7420e36293
commit 8d7aa7565b

View file

@ -1247,6 +1247,17 @@ SM_STEP(EAP)
break;
}
SM_ENTER(EAP, SEND_REQUEST);
if (sm->eap_if.eapNoReq && !sm->eap_if.eapReq) {
/*
* This transition is not mentioned in RFC 4137, but it
* is needed to handle cleanly a case where EAP method
* buildReq fails.
*/
wpa_printf(MSG_DEBUG,
"EAP: Method did not return a request");
SM_ENTER(EAP, FAILURE);
break;
}
break;
case EAP_METHOD_RESPONSE:
/*