Browse Source

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 <j@w1.fi>
Jouni Malinen 9 years ago
parent
commit
5882c011d6
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/eap_peer/eap_wsc.c

+ 3 - 0
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;