summaryrefslogtreecommitdiff
path: root/data/templates/firewall/nftables-bridge.j2
diff options
context:
space:
mode:
authorNicolas Fort <nicolasfort1988@gmail.com>2023-11-22 11:38:00 +0000
committerNicolas Fort <nicolasfort1988@gmail.com>2023-11-22 11:38:00 +0000
commitc45b695ca068f018910eb7513e01657adb7abbbe (patch)
tree6fd84af22908b860cbe56149497f5acdb13468a1 /data/templates/firewall/nftables-bridge.j2
parentd4f9d6ce726ea4d4fff6eecc16678d7a45a0b555 (diff)
downloadvyos-1x-c45b695ca068f018910eb7513e01657adb7abbbe.tar.gz
vyos-1x-c45b695ca068f018910eb7513e01657adb7abbbe.zip
T5637: firewall: extend rule for default-action to firewall bridge, in order to be able to catch logs using separte rule for default-action
Diffstat (limited to 'data/templates/firewall/nftables-bridge.j2')
-rw-r--r--data/templates/firewall/nftables-bridge.j26
1 files changed, 3 insertions, 3 deletions
diff --git a/data/templates/firewall/nftables-bridge.j2 b/data/templates/firewall/nftables-bridge.j2
index 7f94e10d6..dec027bf9 100644
--- a/data/templates/firewall/nftables-bridge.j2
+++ b/data/templates/firewall/nftables-bridge.j2
@@ -2,9 +2,8 @@
{% set ns = namespace(sets=[]) %}
{% if bridge.forward is vyos_defined %}
{% for prior, conf in bridge.forward.items() %}
-{% set def_action = conf.default_action %}
chain VYOS_FORWARD_{{ prior }} {
- type filter hook forward priority {{ prior }}; policy {{ def_action }};
+ type filter hook forward priority {{ prior }}; policy accept;
{% if conf.rule is vyos_defined %}
{% for rule_id, rule_conf in conf.rule.items() if rule_conf.disable is not vyos_defined %}
{{ rule_conf | nft_rule('FWD', prior, rule_id, 'bri') }}
@@ -13,6 +12,7 @@
{% endif %}
{% endfor %}
{% endif %}
+ {{ conf | nft_default_rule('FWD-filter', 'bri') }}
}
{% endfor %}
{% endif %}
@@ -28,7 +28,7 @@
{% endif %}
{% endfor %}
{% endif %}
- {{ conf | nft_default_rule(name_text) }}
+ {{ conf | nft_default_rule(name_text, 'bri') }}
}
{% endfor %}
{% endif %}