From 15e55af88e6104608487c1138641fcff54594d89 Mon Sep 17 00:00:00 2001 From: Nicolas Fort Date: Sat, 23 Apr 2022 12:05:57 +0000 Subject: Firewall: T990: Modifications for new connection-status cli --- python/vyos/firewall.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/vyos/firewall.py b/python/vyos/firewall.py index 06731dd64..04fd44173 100644 --- a/python/vyos/firewall.py +++ b/python/vyos/firewall.py @@ -51,7 +51,12 @@ def parse_rule(rule_conf, fw_name, rule_id, ip_name): if 'connection_status' in rule_conf and rule_conf['connection_status']: status = rule_conf['connection_status'] - output.append(f'ct status {{{status}}}') + if status['nat'] == 'destination': + nat_status = '{dnat}' + output.append(f'ct status {nat_status}') + if status['nat'] == 'source': + nat_status = '{snat}' + output.append(f'ct status {nat_status}') if 'protocol' in rule_conf and rule_conf['protocol'] != 'all': proto = rule_conf['protocol'] -- cgit v1.2.3