diff mbox

[1/3] mesh: Fire event on SAE authentication failure

Message ID 1423144801-25777-1-git-send-email-masashi.honma@gmail.com
State Accepted
Headers show

Commit Message

Masashi Honma Feb. 5, 2015, 1:59 p.m. UTC
SAE authentication fails likely with wrong password. This patch notify the
failure to the upper application (UI) so that the application notifies
suspection of wrong password to user.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
---
 src/common/wpa_ctrl.h     | 2 ++
 wpa_supplicant/mesh_rsn.c | 2 ++
 2 files changed, 4 insertions(+)

Comments

Jouni Malinen Feb. 8, 2015, 2:03 p.m. UTC | #1
On Thu, Feb 05, 2015 at 10:59:59PM +0900, Masashi Honma wrote:
> SAE authentication fails likely with wrong password. This patch notify the
> failure to the upper application (UI) so that the application notifies
> suspection of wrong password to user.

Thanks, all three applied.
diff mbox

Patch

diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h
index c8e302a..2194b6e 100644
--- a/src/common/wpa_ctrl.h
+++ b/src/common/wpa_ctrl.h
@@ -127,6 +127,8 @@  extern "C" {
 #define MESH_GROUP_REMOVED "MESH-GROUP-REMOVED "
 #define MESH_PEER_CONNECTED "MESH-PEER-CONNECTED "
 #define MESH_PEER_DISCONNECTED "MESH-PEER-DISCONNECTED "
+/** Mesh SAE auth failure. Wrong password suspected */
+#define MESH_SAE_AUTH_FAILURE "MESH-SAE-AUTH-FAILURE "
 
 /* WMM AC events */
 #define WMM_AC_EVENT_TSPEC_ADDED "TSPEC-ADDED "
diff --git a/wpa_supplicant/mesh_rsn.c b/wpa_supplicant/mesh_rsn.c
index da4cb03..30862d9 100644
--- a/wpa_supplicant/mesh_rsn.c
+++ b/wpa_supplicant/mesh_rsn.c
@@ -37,6 +37,8 @@  void mesh_auth_timer(void *eloop_ctx, void *user_data)
 		wpa_printf(MSG_DEBUG, "AUTH: Re-authenticate with " MACSTR
 			   " (attempt %d) ",
 			   MAC2STR(sta->addr), sta->sae_auth_retry);
+		wpa_msg(wpa_s, MSG_WARNING, MESH_SAE_AUTH_FAILURE "addr="
+			MACSTR, MAC2STR(sta->addr));
 		if (sta->sae_auth_retry < MESH_AUTH_RETRY) {
 			mesh_rsn_auth_sae_sta(wpa_s, sta);
 		} else {