diff mbox series

[RFC] mesh: allow processing authentication frames in blocked state

Message ID 20190218120442.77624-1-nbd@nbd.name
State RFC
Headers show
Series [RFC] mesh: allow processing authentication frames in blocked state | expand

Commit Message

Felix Fietkau Feb. 18, 2019, 12:04 p.m. UTC
If authentication fails repeatedly e.g. because of a weak signal, the link
can end up in blocked state. If one of the nodes tries to establish a link
again before it is unblocked on the other side, it will block the link to
that other side. The same happens on the other side when it unblocks the
link. In that scenario, the link never recovers on its own.

To fix this, allow restarting authentication even if the link is in blocked
state, but don't initiate the attempt until the blocked period is over.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 src/ap/ieee802_11.c | 9 ---------
 1 file changed, 9 deletions(-)

Comments

Jouni Malinen Dec. 30, 2019, 4:12 p.m. UTC | #1
On Mon, Feb 18, 2019 at 01:04:42PM +0100, Felix Fietkau wrote:
> If authentication fails repeatedly e.g. because of a weak signal, the link
> can end up in blocked state. If one of the nodes tries to establish a link
> again before it is unblocked on the other side, it will block the link to
> that other side. The same happens on the other side when it unblocks the
> link. In that scenario, the link never recovers on its own.
> 
> To fix this, allow restarting authentication even if the link is in blocked
> state, but don't initiate the attempt until the blocked period is over.

I have not seen any comments on this so far. Was there any addition work
going on in this area?

PLINK_BLOCKED seems to be a implementation specific state, i.e., not
defined in IEEE Std 802.11-2016. The nl80211 part for it
(NL80211_PLINK_BLOCKED) is clearly defined to discard all frames ("all
frames transmitted from this mesh plink are discarded"), so this patch
would seem to be against that definition. As such, I'd like to see
nl80211.h in the kernel updated first if there is desire to change
behavior the plink blocked state.
diff mbox series

Patch

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index c6138e1af..e54adc81e 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -1955,15 +1955,6 @@  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) {