summaryrefslogtreecommitdiff
path: root/src/op_mode/nat.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-07-27 19:53:51 +0200
committerGitHub <noreply@github.com>2022-07-27 19:53:51 +0200
commitb33de0bac8172f3571ffc6d46b87de0c906e1b48 (patch)
treebbb0e8be26e0209b7e27b7a3c3e59170987f77cb /src/op_mode/nat.py
parent8bbaafd554d003078607121e2de662c9c8edee40 (diff)
parent948e55af1f59b99f98d807a142ed5b77c2680e2a (diff)
downloadvyos-1x-b33de0bac8172f3571ffc6d46b87de0c906e1b48.tar.gz
vyos-1x-b33de0bac8172f3571ffc6d46b87de0c906e1b48.zip
Merge pull request #1439 from sever-sever/T4531
nat: T4531: Fix op-mode NAT rules add default values
Diffstat (limited to 'src/op_mode/nat.py')
-rwxr-xr-xsrc/op_mode/nat.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/op_mode/nat.py b/src/op_mode/nat.py
index f3f79f863..666c72c7c 100755
--- a/src/op_mode/nat.py
+++ b/src/op_mode/nat.py
@@ -52,6 +52,9 @@ def _get_raw_data_rules(direction):
def _get_formatted_output_rules(data, direction):
+ # Add default values before loop
+ sport, dport, proto = 'any', 'any', 'any'
+ saddr, daddr = '0.0.0.0/0', '0.0.0.0/0'
data_entries = []
for rule in data:
if 'comment' in rule['rule']: