From 5882c011d687e07d2bf7c0c6bc5b851cc2d01bd0 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 30 Aug 2015 18:36:28 +0300 Subject: [PATCH] EAP-WSC peer: Reject connection on unexpected failure Previously, the EAP-WSC peer state machine ended up just ignoring an error and waiting for a new message from the AP. This is not going to recover the exchange, so simply force the connection to terminate immediately. Signed-off-by: Jouni Malinen --- src/eap_peer/eap_wsc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/eap_peer/eap_wsc.c b/src/eap_peer/eap_wsc.c index 7ce0a53d0..7ac99c7ce 100644 --- a/src/eap_peer/eap_wsc.c +++ b/src/eap_peer/eap_wsc.c @@ -557,6 +557,9 @@ send_msg: if (data->out_buf == NULL) { wpa_printf(MSG_DEBUG, "EAP-WSC: Failed to receive " "message from WPS"); + eap_wsc_state(data, FAIL); + ret->methodState = METHOD_DONE; + ret->decision = DECISION_FAIL; return NULL; } data->out_used = 0;