diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-01-03 10:24:20 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-01-03 10:26:43 +0100 |
commit | cdc1748b8489251a45875736a99633740529ea0c (patch) | |
tree | d2d6a4c64bc7e0152a38b5805bbeec56213e92ae /src | |
parent | cb16068ccde3b39f2e0e2aa450da7df55f782c1c (diff) | |
download | vyos-1x-cdc1748b8489251a45875736a99633740529ea0c.tar.gz vyos-1x-cdc1748b8489251a45875736a99633740529ea0c.zip |
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.
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/dhcp_server.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 |