From: Felix Fietkau Date: Fri, 10 Jul 2026 12:43:40 +0000 (+0200) Subject: hostapd: ucode: force restart on unresolvable static BSSID conflict X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f536d79fcd13f3f50a30adc387aa3e370dc08a69;p=thirdparty%2Fopenwrt.git hostapd: ucode: force restart on unresolvable static BSSID conflict The guard meant to bail to a full restart read `!mac_idx < 0`, which parses as `(!mac_idx) < 0` and is always false, so a static BSSID colliding with the first (or a foreign-owned) BSS fell through and reassigned the wrong BSS's address. Use `mac_idx <= 0`. Signed-off-by: Felix Fietkau --- diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc index 4b85fd28637..98e8dc9f840 100644 --- a/package/network/services/hostapd/files/hostapd.uc +++ b/package/network/services/hostapd/files/hostapd.uc @@ -859,7 +859,7 @@ function iface_reload_config(name, phydev, config, old_config) // with the bssid of a reused interface. reassign the reused interface if (!bsscfg.default_macaddr) { // can't update bssid of the first BSS, need to restart - if (!mac_idx < 0) + if (mac_idx <= 0) return false; bsscfg = config.bss[mac_idx];