summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-05-22 08:16:57 +0200
committerGitHub <noreply@github.com>2024-05-22 08:16:57 +0200
commitd702b781f472a370ecb8c5d6a45cf19505948f3c (patch)
tree02765b5971f4232475d6e174f85a383d888c939c /python
parent202c1d15999175e745f762b6c349f458c82857b5 (diff)
parentd3fb767da14edd510e29f7fc42fea11a90437330 (diff)
downloadvyos-1x-d702b781f472a370ecb8c5d6a45cf19505948f3c.tar.gz
vyos-1x-d702b781f472a370ecb8c5d6a45cf19505948f3c.zip
Merge pull request #3495 from vyos/mergify/bp/sagitta/pr-3493
T6375: Fix/Update NAT logging (backport #3493)
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)