]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
hostapd: ucode: keep comment lines out of the config comparison data
authorFelix Fietkau <nbd@nbd.name>
Fri, 10 Jul 2026 12:52:38 +0000 (14:52 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 16 Jul 2026 09:50:22 +0000 (11:50 +0200)
The generator emits a '# Setup interface: <ifname>' comment before each
interface, so the first one landed in config.radio.data and made the radio
comparison depend on the first BSS's ifname: renaming it forced a full
radio restart instead of the rename path. Skip comment lines when parsing
radio.data/bss.data.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/hostapd/files/hostapd.uc

index a923365156ded07a576c67f0d8a492b7f8cc2cff..919c05fcc2e31e30600bc38204f69d28a9fcf52b 100644 (file)
@@ -1084,6 +1084,9 @@ function iface_load_config(phy, radio, filename)
                if (!val[0])
                        continue;
 
+               if (substr(line, 0, 2) == "# ")
+                       continue;
+
                if (val[0] == "interface") {
                        bss = config_add_bss(config, val[1]);
                        break;
@@ -1124,6 +1127,9 @@ function iface_load_config(phy, radio, filename)
                if (!val[0])
                        continue;
 
+               if (substr(line, 0, 2) == "# ")
+                       continue;
+
                if (val[0] == "bssid") {
                        bss.bssid = lc(val[1]);
                        continue;