diff options
| author | Stijn Tintel | 2022-06-13 07:57:29 +0000 |
|---|---|---|
| committer | Stijn Tintel | 2022-06-13 07:59:03 +0000 |
| commit | 11f5c7bf88acb104cdd306761ff662aa72ba9340 (patch) | |
| tree | 080acbae8928f5b5824e0fcd3ec7e9c222701545 | |
| parent | 210991df51587bdb736b4fc74b1200ec6cf6ecc7 (diff) | |
| download | firewall4-11f5c7bf88acb104cdd306761ff662aa72ba9340.tar.gz | |
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 <jo@mein.io>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
| -rw-r--r-- | root/usr/share/ucode/fw4.uc | 9 |
1 files changed, 6 insertions, 3 deletions
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) { |