[PATCH] 4addr: fix reconnecting client on connection lost

Matthias May matthias.may at neratec.com
Tue Jul 5 06:00:43 PDT 2016


When a 4addr client suddenly looses its connection (no deauth/deassoc)
the AP still thinks it is connected.
If the client reconnects before the AP timeoutes the client, traffic
cannot flow.

Fix this by making sure the WLAN_STA_WDS flag is unset in the sta->flags
when the client completes association.

Signed-off-by: Matthias May <matthias.may at neratec.com>
---
 src/ap/ieee802_11.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 11f12f9..3262ae1 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -2829,6 +2829,7 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
 		new_assoc = 0;
 	sta->flags |= WLAN_STA_ASSOC;
 	sta->flags &= ~WLAN_STA_WNM_SLEEP_MODE;
+	sta->flags &= ~WLAN_STA_WDS;
 	if ((!hapd->conf->ieee802_1x && !hapd->conf->wpa && !hapd->conf->osen) ||
 	    sta->auth_alg == WLAN_AUTH_FT) {
 		/*
-- 
2.8.1




More information about the Hostap mailing list