diff mbox

mesh: Drop authentication frame from BLOCKED STA

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

Commit Message

Masashi Honma Feb. 17, 2016, 10:48 a.m. UTC
Current code drops only action frame from BLOCKED STA, so this patch modifies
it to drop authentication frame also.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
---
 src/ap/ieee802_11.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Comments

Jouni Malinen Feb. 18, 2016, 7:47 p.m. UTC | #1
On Wed, Feb 17, 2016 at 07:48:53PM +0900, Masashi Honma wrote:
> Current code drops only action frame from BLOCKED STA, so this patch modifies
> it to drop authentication frame also.

Thanks, applied.
diff mbox

Patch

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index ec6f8a7..e85ccae 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -1067,13 +1067,22 @@  static void handle_auth(struct hostapd_data *hapd,
 				       seq_ctrl);
 			return;
 		}
+#ifdef CONFIG_MESH
+		if (hapd->conf->mesh & MESH_ENABLED &&
+		    sta->plink_state == PLINK_BLOCKED) {
+			wpa_printf(MSG_DEBUG, "Mesh peer " MACSTR
+				   " is blocked - drop Authentication frame",
+				   MAC2STR(mgmt->sa));
+			return;
+		}
+#endif /* CONFIG_MESH */
 	} else {
 #ifdef CONFIG_MESH
 		if (hapd->conf->mesh & MESH_ENABLED) {
 			/* if the mesh peer is not available, we don't do auth.
 			 */
 			wpa_printf(MSG_DEBUG, "Mesh peer " MACSTR
-				   " not yet known - drop Authentiation frame",
+				   " not yet known - drop Authentication frame",
 				   MAC2STR(mgmt->sa));
 			/*
 			 * Save a copy of the frame so that it can be processed