]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
hostapd: ignore comment lines for hash comparison
authorFelix Fietkau <nbd@nbd.name>
Wed, 9 Jul 2025 10:12:40 +0000 (12:12 +0200)
committerFelix Fietkau <nbd@nbd.name>
Wed, 9 Jul 2025 10:14:30 +0000 (12:14 +0200)
Fixes spurious unnecessary bss restarts

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

index b7ef22ce6f0be8b635564c5a9333920f96fab3b2..3e941ae415fe35de55d3136c0edc7444e1d02347 100644 (file)
@@ -412,7 +412,11 @@ function bss_reload_rxkhs(bss, config, old_config)
 
 function remove_file_fields(config)
 {
-       return filter(config, (line) => !hostapd.data.file_fields[split(line, "=")[0]]);
+       return filter(config, (line) =>
+               !match(line, /^\s*$/) &&
+               !match(line, /^\s*#/) &&
+               !hostapd.data.file_fields[split(line, "=")[0]]
+       );
 }
 
 function bss_remove_file_fields(config)