summaryrefslogtreecommitdiff
path: root/data/templates/firewall/nftables-policy.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-01-20 20:22:18 +0100
committerGitHub <noreply@github.com>2022-01-20 20:22:18 +0100
commitfcb1b6c69ffc644769006ee605812461dcb1d048 (patch)
tree0b40c38c2f6b343349e2db8664d9f0b01ace5a13 /data/templates/firewall/nftables-policy.tmpl
parent876d108c5dbab98f9d7a38c05abe098c0ca2d919 (diff)
parentd1d0150b6a40252700181530ca87c5699a4bd0b4 (diff)
downloadvyos-1x-fcb1b6c69ffc644769006ee605812461dcb1d048.tar.gz
vyos-1x-fcb1b6c69ffc644769006ee605812461dcb1d048.zip
Merge pull request #1181 from sarthurdev/firewall
firewall: T2199: Add log prefix to match legacy perl behaviour
Diffstat (limited to 'data/templates/firewall/nftables-policy.tmpl')
-rw-r--r--data/templates/firewall/nftables-policy.tmpl10
1 files changed, 2 insertions, 8 deletions
diff --git a/data/templates/firewall/nftables-policy.tmpl b/data/templates/firewall/nftables-policy.tmpl
index 484b6f203..905ffcd09 100644
--- a/data/templates/firewall/nftables-policy.tmpl
+++ b/data/templates/firewall/nftables-policy.tmpl
@@ -25,11 +25,7 @@ table ip mangle {
{{ rule_conf | nft_rule(route_text, rule_id, 'ip') }}
{% endfor %}
{% endif %}
-{% if conf.default_action is defined %}
- counter {{ conf.default_action | nft_action }} comment "{{ name_text }} default-action {{ conf.default_action }}"
-{% else %}
- counter return
-{% endif %}
+ {{ conf | nft_default_rule(route_text) }}
}
{% endfor %}
{%- endif %}
@@ -52,9 +48,7 @@ table ip6 mangle {
{{ rule_conf | nft_rule(route_text, rule_id, 'ip6') }}
{% endfor %}
{% endif %}
-{% if conf.default_action is defined %}
- counter {{ conf.default_action | nft_action }} comment "{{ name_text }} default-action {{ conf.default_action }}"
-{% endif %}
+ {{ conf | nft_default_rule(route_text) }}
}
{% endfor %}
{% endif %}