1 From 8a4893dd06eb236460db4937f3c54e246739ad28 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= <raphael.melotte@mind.be>
3 Date: Wed, 3 Feb 2021 14:23:17 +0100
4 Subject: [PATCH] wpa_supplicant: multi_ap: only enable 4addr mode if not
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 If 4addr mode is already enabled, the call to enable it a second time
11 may fail. If this happens when roaming, it leads to deauthentication.
13 Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
15 wpa_supplicant/events.c | 10 ++++++----
16 1 file changed, 6 insertions(+), 4 deletions(-)
18 --- a/wpa_supplicant/events.c
19 +++ b/wpa_supplicant/events.c
20 @@ -2589,11 +2589,13 @@ static void multi_ap_set_4addr_mode(stru
24 - if (wpa_drv_set_4addr_mode(wpa_s, 1) < 0) {
25 - wpa_printf(MSG_ERROR, "Failed to set 4addr mode");
27 + if (wpa_s->enabled_4addr_mode == 0) {
28 + if (wpa_drv_set_4addr_mode(wpa_s, 1) < 0) {
29 + wpa_printf(MSG_ERROR, "Failed to set 4addr mode");
32 + wpa_s->enabled_4addr_mode = 1;
34 - wpa_s->enabled_4addr_mode = 1;