summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-05-21 19:50:13 +0200
committerGitHub <noreply@github.com>2024-05-21 19:50:13 +0200
commita67cde68b553ee816162ccb7804c3f57664ed004 (patch)
tree5efde43b02b7fd25748734b8e21ec7b75acf0330 /python
parent9f55afc424b2c7cb885ea5b917e899141123de1c (diff)
parent5cb9b84bd9ce909460d8da7f039d9371143ede6c (diff)
downloadvyos-1x-a67cde68b553ee816162ccb7804c3f57664ed004.tar.gz
vyos-1x-a67cde68b553ee816162ccb7804c3f57664ed004.zip
Merge pull request #3493 from l0crian1/T6375-fix-add-nat-logging
T6375: Fix/Update NAT logging
Diffstat (limited to 'python')
-rw-r--r--python/vyos/nat.py6
1 files changed, 3 insertions, 3 deletions
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)