From 5cb9b84bd9ce909460d8da7f039d9371143ede6c Mon Sep 17 00:00:00 2001 From: l0crian1 Date: Tue, 21 May 2024 09:35:29 -0400 Subject: T6375: Fix/Update NAT logging Fixed broken logging for "show log nat" Added the following commands: show log nat source show log nat source rule show log nat destination nat show log nat destination nat rule show log nat static show log nat static rule --- python/vyos/nat.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python') diff --git a/python/vyos/nat.py b/python/vyos/nat.py index 2ada29add..e54548788 100644 --- a/python/vyos/nat.py +++ b/python/vyos/nat.py @@ -300,12 +300,12 @@ def parse_nat_static_rule(rule_conf, rule_id, nat_type): output.append('counter') - if translation_str: - output.append(translation_str) - if 'log' in rule_conf: output.append(f'log prefix "[{log_prefix}{log_suffix}]"') + if translation_str: + output.append(translation_str) + output.append(f'comment "{log_prefix}"') return " ".join(output) -- cgit v1.2.3