summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo-Philipp Wich2022-05-20 10:10:30 +0000
committerJo-Philipp Wich2022-05-20 10:10:30 +0000
commitd00529356b58fbf6f754e85dcc34ed53ab5d3387 (patch)
treecfdb7452aa9531fd14a4eedc8a3cc189a45a3ddc
parentb2682251a173103490a4a2556fb87e4df1d627b3 (diff)
downloadfirewall4-d00529356b58fbf6f754e85dcc34ed53ab5d3387.tar.gz
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 <jo@mein.io>
-rw-r--r--root/usr/share/ucode/fw4.uc4
1 files changed, 3 insertions, 1 deletions
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];