[PATCH] wpa_supplicant: multi_ap: only enable 4addr mode if not already enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If 4addr mode is already enabled, the call to enable it a second time
may fail. If this happens when roaming, it leads to deauthentication.

Signed-off-by: Raphaël Mélotte <raphael.melotte@xxxxxxx>
---
 wpa_supplicant/events.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 199829bcf..7682dae76 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -2627,11 +2627,13 @@ static void multi_ap_set_4addr_mode(struct wpa_supplicant *wpa_s)
 		goto fail;
 	}
 
-	if (wpa_drv_set_4addr_mode(wpa_s, 1) < 0) {
-		wpa_printf(MSG_ERROR, "Failed to set 4addr mode");
-		goto fail;
+	if (wpa_s->enabled_4addr_mode == 0) {
+		if (wpa_drv_set_4addr_mode(wpa_s, 1) < 0) {
+			wpa_printf(MSG_ERROR, "Failed to set 4addr mode");
+			goto fail;
+		}
+		wpa_s->enabled_4addr_mode = 1;
 	}
-	wpa_s->enabled_4addr_mode = 1;
 	return;
 
 fail:
-- 
2.29.2


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux