]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
EAP server: Add event messages for more EAP states
authorMichael Baird <Michael.Baird@ecs.vuw.ac.nz>
Thu, 28 Sep 2017 05:53:35 +0000 (18:53 +1300)
committerJouni Malinen <j@w1.fi>
Sat, 21 Oct 2017 17:28:46 +0000 (20:28 +0300)
While using an external RADIUS server SUCCESS messages were not being
sent (internal was fine). Also add event messages for other states that
others might find useful, and consistency between the two.

Signed-off-by: Michael Baird <Michael.Baird@ecs.vuw.ac.nz>
src/common/wpa_ctrl.h
src/eap_server/eap_server.c

index c59bc608f6cf454351530cf1d30b6d71ce816f48..e4fb53c1524bde583cec26e833438d695ce4ae05 100644 (file)
@@ -50,10 +50,18 @@ extern "C" {
 #define WPA_EVENT_EAP_TLS_CERT_ERROR "CTRL-EVENT-EAP-TLS-CERT-ERROR "
 /** EAP status */
 #define WPA_EVENT_EAP_STATUS "CTRL-EVENT-EAP-STATUS "
+/** Retransmit the previous request packet */
+#define WPA_EVENT_EAP_RETRANSMIT "CTRL-EVENT-EAP-RETRANSMIT "
+#define WPA_EVENT_EAP_RETRANSMIT2 "CTRL-EVENT-EAP-RETRANSMIT2 "
 /** EAP authentication completed successfully */
 #define WPA_EVENT_EAP_SUCCESS "CTRL-EVENT-EAP-SUCCESS "
+#define WPA_EVENT_EAP_SUCCESS2 "CTRL-EVENT-EAP-SUCCESS2 "
 /** EAP authentication failed (EAP-Failure received) */
 #define WPA_EVENT_EAP_FAILURE "CTRL-EVENT-EAP-FAILURE "
+#define WPA_EVENT_EAP_FAILURE2 "CTRL-EVENT-EAP-FAILURE2 "
+/** EAP authentication failed due to no response received */
+#define WPA_EVENT_EAP_TIMEOUT_FAILURE "CTRL-EVENT-EAP-TIMEOUT-FAILURE "
+#define WPA_EVENT_EAP_TIMEOUT_FAILURE2 "CTRL-EVENT-EAP-TIMEOUT-FAILURE2 "
 /** Network block temporarily disabled (e.g., due to authentication failure) */
 #define WPA_EVENT_TEMP_DISABLED "CTRL-EVENT-SSID-TEMP-DISABLED "
 /** Temporarily disabled network block re-enabled */
index 9706e2576eb726b44aeb4c609c1ea060aa265649..c1619f910162cc0fb84e68ae3028cd52a448fae8 100644 (file)
@@ -326,6 +326,9 @@ SM_STATE(EAP, RETRANSMIT)
                if (eap_copy_buf(&sm->eap_if.eapReqData, sm->lastReqData) == 0)
                        sm->eap_if.eapReq = TRUE;
        }
+
+       wpa_msg(sm->msg_ctx, MSG_INFO, WPA_EVENT_EAP_RETRANSMIT MACSTR,
+               MAC2STR(sm->peer_addr));
 }
 
 
@@ -634,6 +637,9 @@ SM_STATE(EAP, TIMEOUT_FAILURE)
        SM_ENTRY(EAP, TIMEOUT_FAILURE);
 
        sm->eap_if.eapTimeout = TRUE;
+
+       wpa_msg(sm->msg_ctx, MSG_INFO, WPA_EVENT_EAP_TIMEOUT_FAILURE MACSTR,
+               MAC2STR(sm->peer_addr));
 }
 
 
@@ -1011,6 +1017,9 @@ SM_STATE(EAP, RETRANSMIT2)
                if (eap_copy_buf(&sm->eap_if.eapReqData, sm->lastReqData) == 0)
                        sm->eap_if.eapReq = TRUE;
        }
+
+       wpa_msg(sm->msg_ctx, MSG_INFO, WPA_EVENT_EAP_RETRANSMIT2 MACSTR,
+               MAC2STR(sm->peer_addr));
 }
 
 
@@ -1101,6 +1110,9 @@ SM_STATE(EAP, TIMEOUT_FAILURE2)
        SM_ENTRY(EAP, TIMEOUT_FAILURE2);
 
        sm->eap_if.eapTimeout = TRUE;
+
+       wpa_msg(sm->msg_ctx, MSG_INFO, WPA_EVENT_EAP_TIMEOUT_FAILURE2 MACSTR,
+               MAC2STR(sm->peer_addr));
 }
 
 
@@ -1110,6 +1122,9 @@ SM_STATE(EAP, FAILURE2)
 
        eap_copy_buf(&sm->eap_if.eapReqData, sm->eap_if.aaaEapReqData);
        sm->eap_if.eapFail = TRUE;
+
+       wpa_msg(sm->msg_ctx, MSG_INFO, WPA_EVENT_EAP_FAILURE2 MACSTR,
+               MAC2STR(sm->peer_addr));
 }
 
 
@@ -1136,6 +1151,9 @@ SM_STATE(EAP, SUCCESS2)
         * started properly.
         */
        sm->start_reauth = TRUE;
+
+       wpa_msg(sm->msg_ctx, MSG_INFO, WPA_EVENT_EAP_SUCCESS2 MACSTR,
+               MAC2STR(sm->peer_addr));
 }