]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Fix 'start_disabled' option being ignored
authorHancheng Yang <hyang@freebox.fr>
Mon, 13 Jan 2025 13:30:20 +0000 (14:30 +0100)
committerJouni Malinen <j@w1.fi>
Sun, 26 Jan 2025 07:43:43 +0000 (09:43 +0200)
Fix two cases where 'start_disabled' were not respected:
- when ieee802_11_set_beacon() is called for a BSS, same operation will
  be called for all its colocated BSSs. Now we set beacon only for BSSs
  which have already had their beacon setting done.
- replace ieee802_11_set_beacons() by ieee802_11_update_beacons() in
  hostapd_setup_interface_complete_sync() for the same reason.

Signed-off-by: Hancheng Yang <hyang@freebox.fr>
src/ap/beacon.c
src/ap/hostapd.c

index 542768daa4b313c2ea84b63dc640b76e5e36e7db..5d50a9d9fc900961ffed70d01e0ae3ae6456f447 100644 (file)
@@ -3248,7 +3248,8 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd)
                                continue;
 #endif /* CONFIG_IEEE80211BE */
 
-                       if (other->bss[i] && other->bss[i]->started)
+                       if (other->bss[i] && other->bss[i]->started &&
+                           other->bss[i]->beacon_set_done)
                                __ieee802_11_set_beacon(other->bss[i]);
                }
        }
index 3510dcc0f23374a7f68a9a4b22ee2d9ca83a119f..0227b8512d08c1f1277ec93b7315960af30e8ab3 100644 (file)
@@ -2765,7 +2765,7 @@ dfs_offload:
                hostapd_neighbor_set_own_report(iface->bss[j]);
 
        if (iface->interfaces && iface->interfaces->count > 1)
-               ieee802_11_set_beacons(iface);
+               ieee802_11_update_beacons(iface);
 
        return 0;