summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-08-30 17:36:19 +0200
committerChristian Poessinger <christian@poessinger.com>2022-08-30 17:38:18 +0200
commit69f79beee2070906b68f2b910296c362e7216278 (patch)
tree5e01f71940415a75a38a05b325400ceffd178286 /python
parenta7fba75a06ef6a9551a1246cc3168a1999347e13 (diff)
downloadvyos-1x-69f79beee2070906b68f2b910296c362e7216278.tar.gz
vyos-1x-69f79beee2070906b68f2b910296c362e7216278.zip
firewall: T4655: implement XML defaultValue for name and ipv6-name
This extends the implementation of commit 0cc7e0a49094 ("firewall: T4655: Fix default action 'drop' for the firewall") in a way that we can now also use the XML <defaultValue> node under "firewall name" and "firewall ipv6-name". This is a much cleaner approach which also adds the default value automatically to the CLIs completion helper ("?").
Diffstat (limited to 'python')
-rw-r--r--python/vyos/template.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/template.py b/python/vyos/template.py
index 62303bd55..9804308c1 100644
--- a/python/vyos/template.py
+++ b/python/vyos/template.py
@@ -550,7 +550,7 @@ def nft_rule(rule_conf, fw_name, rule_id, ip_name='ip'):
@register_filter('nft_default_rule')
def nft_default_rule(fw_conf, fw_name):
output = ['counter']
- default_action = fw_conf.get('default_action', 'drop')
+ default_action = fw_conf['default_action']
if 'enable_default_log' in fw_conf:
action_suffix = default_action[:1].upper()