diff options
author | Razvan Becheriu <razvan@isc.org> | 2020-10-29 11:29:46 +0100 |
---|---|---|
committer | Razvan Becheriu <razvan@isc.org> | 2020-11-18 14:55:23 +0100 |
commit | 059642868aad5c4644be662f2e0664c6c08ad276 (patch) | |
tree | 5548c1a38a48017a21879ad251e87d71010be13c | |
parent | [#1405] regenerated tests (diff) | |
download | kea-059642868aad5c4644be662f2e0664c6c08ad276.tar.xz kea-059642868aad5c4644be662f2e0664c6c08ad276.zip |
[#1405] updated comments
-rw-r--r-- | src/bin/dhcp4/json_config_parser.cc | 8 | ||||
-rw-r--r-- | src/bin/dhcp6/json_config_parser.cc | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/bin/dhcp4/json_config_parser.cc b/src/bin/dhcp4/json_config_parser.cc index 95a586705b..b5d54d17d6 100644 --- a/src/bin/dhcp4/json_config_parser.cc +++ b/src/bin/dhcp4/json_config_parser.cc @@ -432,6 +432,14 @@ configureDhcp4Server(Dhcpv4Srv& server, isc::data::ConstElementPtr config_set, // Apply global options in the staging config, e.g. ip-reservations-unique global_parser.parseEarly(srv_cfg, mutable_cfg); + // If using deprecated reservation-mode, remove defaults for new parameters + // reservations-out-of-pool, reservations-in-subnet and reservations-global. + if (reservation_mode) { + mutable_cfg->remove("reservations-out-of-pool"); + mutable_cfg->remove("reservations-in-subnet"); + mutable_cfg->remove("reservations-global"); + } + // We need definitions first ConstElementPtr option_defs = mutable_cfg->get("option-def"); if (option_defs) { diff --git a/src/bin/dhcp6/json_config_parser.cc b/src/bin/dhcp6/json_config_parser.cc index c38447dd8a..4477a56185 100644 --- a/src/bin/dhcp6/json_config_parser.cc +++ b/src/bin/dhcp6/json_config_parser.cc @@ -533,6 +533,14 @@ configureDhcp6Server(Dhcpv6Srv& server, isc::data::ConstElementPtr config_set, // Apply global options in the staging config, e.g. ip-reservations-unique global_parser.parseEarly(srv_config, mutable_cfg); + // If using deprecated reservation-mode, remove defaults for new parameters + // reservations-out-of-pool, reservations-in-subnet and reservations-global. + if (reservation_mode) { + mutable_cfg->remove("reservations-out-of-pool"); + mutable_cfg->remove("reservations-in-subnet"); + mutable_cfg->remove("reservations-global"); + } + // Specific check for this global parameter. ConstElementPtr data_directory = mutable_cfg->get("data-directory"); if (data_directory) { |