diff options
author | Nicolas Fort <nicolasfort1988@gmail.com> | 2022-05-12 09:37:47 -0300 |
---|---|---|
committer | Nicolas Fort <nicolasfort1988@gmail.com> | 2022-05-27 14:46:58 +0000 |
commit | 2f3fdb9e96a14abf89a32391b44e24b02c3a96f2 (patch) | |
tree | 352fe8b0fa88bfd8bd145489d57e1cec1cf4592f /python/vyos/template.py | |
parent | 44326619582f52f5439e301271f728e206e18f8b (diff) | |
download | vyos-1x-2f3fdb9e96a14abf89a32391b44e24b02c3a96f2.tar.gz vyos-1x-2f3fdb9e96a14abf89a32391b44e24b02c3a96f2.zip |
Firewall: T3907: Revert migration script 6-to-7 and add new 7-to-8
Diffstat (limited to 'python/vyos/template.py')
-rw-r--r-- | python/vyos/template.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/python/vyos/template.py b/python/vyos/template.py index b41525421..ee82f8f8f 100644 --- a/python/vyos/template.py +++ b/python/vyos/template.py @@ -554,8 +554,7 @@ def nft_default_rule(fw_conf, fw_name): if 'enable_default_log' in fw_conf: action_suffix = default_action[:1].upper() - log_level = fw_conf['enable_default_log'] - output.append(f'log prefix "[{fw_name[:19]}-default-{action_suffix}]" level {log_level}') + output.append(f'log prefix "[{fw_name[:19]}-default-{action_suffix}]"') output.append(nft_action(default_action)) output.append(f'comment "{fw_name} default-action {default_action}"') @@ -565,8 +564,9 @@ def nft_default_rule(fw_conf, fw_name): def nft_state_policy(conf, state, ipv6=False): out = [f'ct state {state}'] - if 'log' in conf and 'enable' in conf['log']: - out.append('log') + if 'log' in conf: + log_level = conf['log'] + out.append(f'log level {log_level}') out.append('counter') |