summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-11-22 13:24:04 +0100
committerGitHub <noreply@github.com>2023-11-22 13:24:04 +0100
commit8f853daa22fe2f822dae0574bf0bb35607d460a8 (patch)
tree592e6be8a7b22152f45284c217d12310f7f1234c /python
parent9a5785c698d5a2819a4c51dfe3536ff83106a0c8 (diff)
parentc45b695ca068f018910eb7513e01657adb7abbbe (diff)
downloadvyos-1x-8f853daa22fe2f822dae0574bf0bb35607d460a8.tar.gz
vyos-1x-8f853daa22fe2f822dae0574bf0bb35607d460a8.zip
Merge pull request #2528 from nicolas-fort/T5637-Extend-bridge
T5637: firewall: extend rule for default-action to firewall bridge
Diffstat (limited to 'python')
-rw-r--r--python/vyos/template.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/vyos/template.py b/python/vyos/template.py
index c778d0de8..1e683b605 100644
--- a/python/vyos/template.py
+++ b/python/vyos/template.py
@@ -579,10 +579,10 @@ def nft_rule(rule_conf, fw_hook, fw_name, rule_id, ip_name='ip'):
return parse_rule(rule_conf, fw_hook, fw_name, rule_id, ip_name)
@register_filter('nft_default_rule')
-def nft_default_rule(fw_conf, fw_name, ipv6=False):
+def nft_default_rule(fw_conf, fw_name, family):
output = ['counter']
default_action = fw_conf['default_action']
- family = 'ipv6' if ipv6 else 'ipv4'
+ #family = 'ipv6' if ipv6 else 'ipv4'
if 'enable_default_log' in fw_conf:
action_suffix = default_action[:1].upper()
@@ -592,7 +592,7 @@ def nft_default_rule(fw_conf, fw_name, ipv6=False):
output.append(f'{default_action}')
if 'default_jump_target' in fw_conf:
target = fw_conf['default_jump_target']
- def_suffix = '6' if ipv6 else ''
+ def_suffix = '6' if family == 'ipv6' else ''
output.append(f'NAME{def_suffix}_{target}')
output.append(f'comment "{fw_name} default-action {default_action}"')