summaryrefslogtreecommitdiff
path: root/python/vyos/template.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-12-16 08:22:15 +0100
committerGitHub <noreply@github.com>2023-12-16 08:22:15 +0100
commit9afd896937ba25dcbc03c6b217e08fcd80494c08 (patch)
tree061dc7a5abb02ee75881bcca78b318ce7f7c4ed2 /python/vyos/template.py
parentaf2668c4479377063c2e65e2383648155fb1e8f4 (diff)
parent601616c022d938d39eeeab26673f01a6f7238bf3 (diff)
downloadvyos-1x-9afd896937ba25dcbc03c6b217e08fcd80494c08.tar.gz
vyos-1x-9afd896937ba25dcbc03c6b217e08fcd80494c08.zip
Merge pull request #2597 from GurliGebis/T5775-sagitta-backport
T5775: firewall: re-add state-policy to firewall. (manual backport #2539)
Diffstat (limited to 'python/vyos/template.py')
-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 320abe256..216f967a7 100644
--- a/python/vyos/template.py
+++ b/python/vyos/template.py
@@ -602,7 +602,7 @@ def nft_default_rule(fw_conf, fw_name, ipv6=False):
def nft_state_policy(conf, state):
out = [f'ct state {state}']
- if 'log' in conf and 'enable' in conf['log']:
+ if 'log' in conf:
log_state = state[:3].upper()
log_action = (conf['action'] if 'action' in conf else 'accept')[:1].upper()
out.append(f'log prefix "[STATE-POLICY-{log_state}-{log_action}]"')