From 8d239aa739776e6ddf37cf7266933e414422893f Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 11 Jan 2021 19:42:04 +0100 Subject: nat: T3206: unable to delete only rules but keep destination node (cherry picked from commit 9db4dbc4a84ff1a110617cb3c7849d7c9d4a62e7) --- src/conf_mode/nat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/conf_mode') 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]) -- cgit v1.2.3