Ensure that the concatenated type . code list values are always formatted
as anonymous set, even if the list just contains one item. Fixes the
following nftables error when parsing such a rule:
Error: Use concatenations with sets and maps, not singleton values
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
{{ (rule.family == 4) ? "icmp" : "icmpv6" }} type {{ fw4.set(rule.icmp_types) }} {%+ endif -%}
{%+ if (rule.icmp_codes): -%}
{{ (rule.family == 4) ? "icmp" : "icmpv6" }} type . {{ (rule.family == 4) ? "icmp" : "icmpv6" }} code {{
- fw4.set(rule.icmp_codes)
+ fw4.set(rule.icmp_codes, true)
}} {%+ endif -%}
{%+ if (rule.helper): -%}
ct helper{% if (rule.helper.invert): %} !={% endif %} {{ fw4.quote(rule.helper.name, true) }} {%+ endif -%}