summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorNicolas Fort <nicolasfort1988@gmail.com>2022-04-11 17:52:30 +0000
committerNicolas Fort <nicolasfort1988@gmail.com>2022-04-11 17:52:30 +0000
commit19d38aa98cd656a2d4c558f6c99635b3d662b9cb (patch)
tree6403a576626ba2f8c7c8cba0457fe86d19d301e0 /python
parent3a5cf74b06cef960e9a701172618c2c366591255 (diff)
downloadvyos-1x-19d38aa98cd656a2d4c558f6c99635b3d662b9cb.tar.gz
vyos-1x-19d38aa98cd656a2d4c558f6c99635b3d662b9cb.zip
Firewall: T990: Add snat and dst connection status on firewall
Diffstat (limited to 'python')
-rw-r--r--python/vyos/firewall.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/python/vyos/firewall.py b/python/vyos/firewall.py
index 5e11e4332..06731dd64 100644
--- a/python/vyos/firewall.py
+++ b/python/vyos/firewall.py
@@ -49,11 +49,9 @@ def parse_rule(rule_conf, fw_name, rule_id, ip_name):
if states:
output.append(f'ct state {{{states}}}')
- if 'ct_status' in rule_conf and rule_conf['ct_status']:
- status = ",".join([s for s, v in rule_conf['ct_status'].items() if v == 'enable'])
-
- if status:
- output.append(f'ct status {{{status}}}')
+ if 'connection_status' in rule_conf and rule_conf['connection_status']:
+ status = rule_conf['connection_status']
+ output.append(f'ct status {{{status}}}')
if 'protocol' in rule_conf and rule_conf['protocol'] != 'all':
proto = rule_conf['protocol']