]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Fix clearing old BSS during config reload
authorAjith C <quic_ajithc@quicinc.com>
Wed, 21 Aug 2024 04:09:01 +0000 (09:39 +0530)
committerJouni Malinen <j@w1.fi>
Wed, 2 Oct 2024 21:38:56 +0000 (00:38 +0300)
After a configuration reload, stations that were previously associated
with the AP could have failed to reconnect under the new configuration.

This issue arises because the new configuration is assigned to the
interface’s configuration pointer too early. The old configuration needs
to remain in the pointer until all existing stations are cleared.

Resolve this issue by assigning the new configuration only after all
existing stations have been cleared.

Fixes: b37c3fbad4a4 ("hostapd: Add config_id parameter")
Signed-off-by: Ajith C <quic_ajithc@quicinc.com>
src/ap/hostapd.c

index 7d924893f17b39211848fa91af9f9cff342dac6b..5ba2cab2c0ba73942f103aa91edf61697320f7ed 100644 (file)
@@ -302,7 +302,6 @@ int hostapd_reload_config(struct hostapd_iface *iface)
                                   "Failed to enable interface on config reload");
                return res;
        }
-       iface->conf = newconf;
 
        for (j = 0; j < iface->num_bss; j++) {
                hapd = iface->bss[j];
@@ -330,6 +329,7 @@ int hostapd_reload_config(struct hostapd_iface *iface)
                hostapd_reload_bss(hapd);
        }
 
+       iface->conf = newconf;
        hostapd_config_free(oldconf);