From: Nazar Mokrynskyi Date: Tue, 14 Nov 2023 03:49:28 +0000 (+0200) Subject: hostapd: fix undeclared variable iface_name X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=684d1a5c359f6bf022b7f526672373d69967bced;p=openwrt%2Fstaging%2Frobimarko.git hostapd: fix undeclared variable iface_name Signed-off-by: Nazar Mokrynskyi --- diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc index 593840cca8..750fd535a4 100644 --- a/package/network/services/hostapd/files/hostapd.uc +++ b/package/network/services/hostapd/files/hostapd.uc @@ -278,12 +278,12 @@ function iface_reload_config(phydev, config, old_config) return false; let iface = hostapd.interfaces[phy]; + let iface_name = old_config.bss[0].ifname; if (!iface) { hostapd.printf(`Could not find previous interface ${iface_name}`); return false; } - let iface_name = old_config.bss[0].ifname; let first_bss = hostapd.bss[iface_name]; if (!first_bss) { hostapd.printf(`Could not find bss of previous interface ${iface_name}`);