From fb860b4e418c28a0f388f215e5acce103dcee1bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= Date: Wed, 17 Feb 2021 15:58:16 +0100 Subject: hostapd: backport ignoring 4addr mode enabling error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a backport of the upstream commit 58bbbb598144 ("nl80211: Ignore 4addr mode enabling error if it was already enabled") which fixes same issue as in the current fix contained in '130-wpa_supplicant-multi_ap_roam.patch', but in a different way: nl80211_set_4addr_mode() could fail when trying to enable 4addr mode on an interface that is in a bridge and has 4addr mode already enabled. This operation would not have been necessary in the first place and this failure results in disconnecting, e.g., when roaming from one backhaul BSS to another BSS with Multi AP. Avoid this issue by ignoring the nl80211 command failure in the case where 4addr mode is being enabled while it has already been enabled. Signed-off-by: Raphaël Mélotte [bump PKG_RELEASE, more verbose commit description] Signed-off-by: Petr Štetiar --- .../patches/130-wpa_supplicant-multi_ap_roam.patch | 37 ---------------------- 1 file changed, 37 deletions(-) delete mode 100644 package/network/services/hostapd/patches/130-wpa_supplicant-multi_ap_roam.patch (limited to 'package/network/services/hostapd/patches/130-wpa_supplicant-multi_ap_roam.patch') diff --git a/package/network/services/hostapd/patches/130-wpa_supplicant-multi_ap_roam.patch b/package/network/services/hostapd/patches/130-wpa_supplicant-multi_ap_roam.patch deleted file mode 100644 index fd3017af92..0000000000 --- a/package/network/services/hostapd/patches/130-wpa_supplicant-multi_ap_roam.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 8a4893dd06eb236460db4937f3c54e246739ad28 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= -Date: Wed, 3 Feb 2021 14:23:17 +0100 -Subject: [PATCH] wpa_supplicant: multi_ap: only enable 4addr mode if not - already enabled -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -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 ---- - wpa_supplicant/events.c | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - ---- a/wpa_supplicant/events.c -+++ b/wpa_supplicant/events.c -@@ -2589,11 +2589,13 @@ static void multi_ap_set_4addr_mode(stru - 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: -- cgit v1.2.3