nftables: adapt to new j2 syntax
parent
54398ce7e9
commit
d31350f130
|
@ -4,13 +4,14 @@
|
|||
# Full licensing information in the LICENSE file, or gnu.org/licences/gpl-3.0.txt if the file is missing.
|
||||
|
||||
flush ruleset
|
||||
|
||||
{% for V in ['4', '6'] %}
|
||||
{% set v = V | replace('4', '') %}
|
||||
{% macro trust(list) %}
|
||||
{% for net in list.split(' ') %}
|
||||
{% if not net is match('127(?:\.\d{1,3}){3}(?:/\d+)?|::1|^$') %}
|
||||
{% if (net is match('\d{1,3}(?:\.\d{1,3}){3}(?:/\d+)?')
|
||||
and V == '4') or (net | search(':') and V == '6') %}
|
||||
and V == '4') or (net is search(':') and V == '6') %}
|
||||
{{caller(net)}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue