diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-01-11 19:42:04 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-01-11 19:42:04 +0100 |
commit | 9db4dbc4a84ff1a110617cb3c7849d7c9d4a62e7 (patch) | |
tree | de1bdb8f7c4ab2f1bee7faab8b16c7e8904fcbce /src | |
parent | a7fe2ff4fdfcb2619b892aff170d42609965b20b (diff) | |
download | vyos-1x-9db4dbc4a84ff1a110617cb3c7849d7c9d4a62e7.tar.gz vyos-1x-9db4dbc4a84ff1a110617cb3c7849d7c9d4a62e7.zip |
nat: T3206: unable to delete only rules but keep destination node
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/nat.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conf_mode/nat.py b/src/conf_mode/nat.py index 1ccec3d2e..2d98cb11b 100755 --- a/src/conf_mode/nat.py +++ b/src/conf_mode/nat.py @@ -88,7 +88,7 @@ def get_config(config=None): for direction in ['source', 'destination']: if direction in nat: default_values = defaults(base + [direction, 'rule']) - for rule in nat[direction]['rule']: + for rule in dict_search(f'{direction}.rule', nat) or []: nat[direction]['rule'][rule] = dict_merge(default_values, nat[direction]['rule'][rule]) |