From cdc1748b8489251a45875736a99633740529ea0c Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 3 Jan 2021 10:24:20 +0100 Subject: dhcp: T3180: bugfix assignment of sliced ranges to config dict A reference to a dictionary key obtained by a for loop can not be used to update values inside that dictionaries key. You must use the original path to the nested dictionaries key. --- src/conf_mode/dhcp_server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/conf_mode/dhcp_server.py') diff --git a/src/conf_mode/dhcp_server.py b/src/conf_mode/dhcp_server.py index fee2afe24..392a69427 100755 --- a/src/conf_mode/dhcp_server.py +++ b/src/conf_mode/dhcp_server.py @@ -126,7 +126,8 @@ def get_config(config=None): new_range_dict.update({new_range_id : slice}) new_range_id +=1 - subnet_config.update({'range' : new_range_dict}) + dhcp['shared_network_name'][network]['subnet'][subnet].update( + {'range' : new_range_dict}) return dhcp -- cgit v1.2.3