blob: b7bf9e351e08b5bad1f47d0de7abdbb57227ea3b [file] [log] [blame]
developerf2e3f562022-12-26 19:41:22 +08001From: Felix Fietkau <nbd@nbd.name>
2Date: Mon, 18 Feb 2019 12:57:11 +0100
3Subject: [PATCH] mesh: allow processing authentication frames in blocked state
4
5If authentication fails repeatedly e.g. because of a weak signal, the link
6can end up in blocked state. If one of the nodes tries to establish a link
7again before it is unblocked on the other side, it will block the link to
8that other side. The same happens on the other side when it unblocks the
9link. In that scenario, the link never recovers on its own.
10
11To fix this, allow restarting authentication even if the link is in blocked
12state, but don't initiate the attempt until the blocked period is over.
13
14Signed-off-by: Felix Fietkau <nbd@nbd.name>
15---
16
17--- a/src/ap/ieee802_11.c
18+++ b/src/ap/ieee802_11.c
developerb85e8752023-09-25 14:16:05 +080019@@ -3020,15 +3020,6 @@ static void handle_auth(struct hostapd_d
developerf2e3f562022-12-26 19:41:22 +080020 seq_ctrl);
21 return;
22 }
23-#ifdef CONFIG_MESH
24- if ((hapd->conf->mesh & MESH_ENABLED) &&
25- sta->plink_state == PLINK_BLOCKED) {
26- wpa_printf(MSG_DEBUG, "Mesh peer " MACSTR
27- " is blocked - drop Authentication frame",
developer9a587882023-07-17 11:11:44 +080028- MAC2STR(sa));
developerf2e3f562022-12-26 19:41:22 +080029- return;
30- }
31-#endif /* CONFIG_MESH */
32 #ifdef CONFIG_PASN
33 if (auth_alg == WLAN_AUTH_PASN &&
34 (sta->flags & WLAN_STA_ASSOC)) {