From: Stijn Tintel Date: Mon, 13 Jun 2022 07:57:29 +0000 (+0300) Subject: fw4.uc: fix zone helper assignment X-Git-Url: http://git.openwrt.org/openwrt/docs.git?a=commitdiff_plain;h=11f5c7bf88acb104cdd306761ff662aa72ba9340;p=project%2Ffirewall4.git fw4.uc: fix zone helper assignment Zone helpers are parsed as an array, so we need to loop over them to check if they are available. Suggested-by: Jo-Philipp Wich Signed-off-by: Stijn Tintel --- diff --git a/root/usr/share/ucode/fw4.uc b/root/usr/share/ucode/fw4.uc index a06d097..a338446 100644 --- a/root/usr/share/ucode/fw4.uc +++ b/root/usr/share/ucode/fw4.uc @@ -1881,9 +1881,12 @@ return { this.warn_section(data, "is disabled, ignoring section"); return; } - else if (zone.helper && !zone.helper.available) { - this.warn_section(data, `uses unavailable ct helper '${zone.helper.name}', ignoring section`); - return; + + for (let helper in zone.helper) { + if (!helper.available) { + this.warn_section(data, `uses unavailable ct helper '${zone.helper.name}', ignoring section`); + return; + } } if (zone.mtu_fix && this.kernel < 0x040a0000) {