fw4: store zone associations from ubus in statefile as well
authorJo-Philipp Wich <jo@mein.io>
Fri, 20 May 2022 10:10:30 +0000 (12:10 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 20 May 2022 10:10:30 +0000 (12:10 +0200)
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>
root/usr/share/ucode/fw4.uc

index 39e850741f75d294d9f3404b2f08b3c1a542eb0d..7ea8bc3e27f268e0ae29563ec9850633211cbabd 100644 (file)
@@ -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];