fw4.uc: fix zone helper assignment
authorStijn Tintel <stijn@linux-ipv6.be>
Mon, 13 Jun 2022 07:57:29 +0000 (10:57 +0300)
committerStijn Tintel <stijn@linux-ipv6.be>
Mon, 13 Jun 2022 07:59:03 +0000 (10:59 +0300)
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>
root/usr/share/ucode/fw4.uc

index a06d097c38b5fb20532ad2fd2bac27359e8481d5..a3384466538fe1298da55611b6294527f46bc7c7 100644 (file)
@@ -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) {