EAP-WSC peer: Reject connection on unexpected failure
authorJouni Malinen <j@w1.fi>
Sun, 30 Aug 2015 15:36:28 +0000 (18:36 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 30 Aug 2015 15:37:44 +0000 (18:37 +0300)
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>
src/eap_peer/eap_wsc.c

index 7ce0a53..7ac99c7 100644 (file)
@@ -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;