developer | 29c4d2d | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 1 | From: Felix Fietkau <nbd@nbd.name> |
| 2 | Date: Mon, 18 Feb 2019 12:57:11 +0100 |
| 3 | Subject: [PATCH] mesh: allow processing authentication frames in blocked state |
| 4 | |
| 5 | If authentication fails repeatedly e.g. because of a weak signal, the link |
| 6 | can end up in blocked state. If one of the nodes tries to establish a link |
| 7 | again before it is unblocked on the other side, it will block the link to |
| 8 | that other side. The same happens on the other side when it unblocks the |
| 9 | link. In that scenario, the link never recovers on its own. |
| 10 | |
| 11 | To fix this, allow restarting authentication even if the link is in blocked |
| 12 | state, but don't initiate the attempt until the blocked period is over. |
| 13 | |
| 14 | Signed-off-by: Felix Fietkau <nbd@nbd.name> |
| 15 | --- |
| 16 | |
| 17 | --- a/src/ap/ieee802_11.c |
| 18 | +++ b/src/ap/ieee802_11.c |
developer | 8bff647 | 2023-07-17 11:11:44 +0800 | [diff] [blame^] | 19 | @@ -3012,15 +3012,6 @@ static void handle_auth(struct hostapd_d |
developer | 29c4d2d | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 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", |
developer | 8bff647 | 2023-07-17 11:11:44 +0800 | [diff] [blame^] | 28 | - MAC2STR(sa)); |
developer | 29c4d2d | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 29 | - return; |
| 30 | - } |
| 31 | -#endif /* CONFIG_MESH */ |
| 32 | #ifdef CONFIG_PASN |
| 33 | if (auth_alg == WLAN_AUTH_PASN && |
| 34 | (sta->flags & WLAN_STA_ASSOC)) { |