summaryrefslogtreecommitdiff
path: root/src/conf_mode/dhcp_server.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-01-03 10:24:20 +0100
committerChristian Poessinger <christian@poessinger.com>2021-01-03 10:26:43 +0100
commitcdc1748b8489251a45875736a99633740529ea0c (patch)
treed2d6a4c64bc7e0152a38b5805bbeec56213e92ae /src/conf_mode/dhcp_server.py
parentcb16068ccde3b39f2e0e2aa450da7df55f782c1c (diff)
downloadvyos-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/conf_mode/dhcp_server.py')
-rwxr-xr-xsrc/conf_mode/dhcp_server.py3
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