From: Jo-Philipp Wich Date: Fri, 20 May 2022 10:10:30 +0000 (+0200) Subject: fw4: store zone associations from ubus in statefile as well X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=d00529356b58fbf6f754e85dcc34ed53ab5d3387;hp=b2682251a173103490a4a2556fb87e4df1d627b3;p=project%2Ffirewall4.git fw4: store zone associations from ubus in statefile as well The current implementation already stored related subnets and devices, but not the logical interface names themselves. Signed-off-by: Jo-Philipp Wich --- diff --git a/root/usr/share/ucode/fw4.uc b/root/usr/share/ucode/fw4.uc index 39e8507..7ea8bc3 100644 --- a/root/usr/share/ucode/fw4.uc +++ b/root/usr/share/ucode/fw4.uc @@ -1902,7 +1902,9 @@ return { push(related_ubus_networks, { invert: false, device: name }); } - for (let e in [ ...to_array(zone.network), ...related_ubus_networks ]) { + zone.network = [ ...to_array(zone.network), ...related_ubus_networks ]; + + for (let e in zone.network) { if (exists(this.state.networks, e.device)) { let net = this.state.networks[e.device];