blob: 6b34cd4350b273973152e8b2e03d2bc5fd30169e [file] [log] [blame]
developer6a1998b2022-12-08 18:09:45 +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
19@@ -3781,15 +3781,6 @@ static void handle_auth(struct hostapd_d
20 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",
28- MAC2STR(mgmt->sa));
29- return;
30- }
31-#endif /* CONFIG_MESH */
32 #ifdef CONFIG_PASN
33 if (auth_alg == WLAN_AUTH_PASN &&
34 (sta->flags & WLAN_STA_ASSOC)) {