From 63b619587621ad1a027740e628892236ad6dafc0 Mon Sep 17 00:00:00 2001 From: Marcin Siodelski Date: Wed, 27 Mar 2019 20:36:43 +0100 Subject: [PATCH] [#490,!284] Extended commentary per review comments. --- src/bin/dhcp4/json_config_parser.cc | 4 +++- src/bin/dhcp6/json_config_parser.cc | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bin/dhcp4/json_config_parser.cc b/src/bin/dhcp4/json_config_parser.cc index 05f10d1cbd..cd0bbb372c 100644 --- a/src/bin/dhcp4/json_config_parser.cc +++ b/src/bin/dhcp4/json_config_parser.cc @@ -536,7 +536,9 @@ configureDhcp4Server(Dhcpv4Srv& server, isc::data::ConstElementPtr config_set, // backend is the dynamic inheritance whereby each subnet and shared // network uses a callback function to return global parameter if it // is not specified at lower level. This callback uses configured globals. - // Let's store all globals there so as they can be accessed. + // We deliberately include both default and explicitly specified globals + // so as the callback can access the appropriate global values regardless + // whether they are set to a default or other value. if ( (config_pair.first == "renew-timer") || (config_pair.first == "rebind-timer") || (config_pair.first == "valid-lifetime") || diff --git a/src/bin/dhcp6/json_config_parser.cc b/src/bin/dhcp6/json_config_parser.cc index c3b1562e0f..89d9e3d1b2 100644 --- a/src/bin/dhcp6/json_config_parser.cc +++ b/src/bin/dhcp6/json_config_parser.cc @@ -660,7 +660,9 @@ configureDhcp6Server(Dhcpv6Srv& server, isc::data::ConstElementPtr config_set, // backend is the dynamic inheritance whereby each subnet and shared // network uses a callback function to return global parameter if it // is not specified at lower level. This callback uses configured globals. - // Let's store all globals there so as they can be accessed. + // We deliberately include both default and explicitly specified globals + // so as the callback can access the appropriate global values regardless + // whether they are set to a default or other value. if ( (config_pair.first == "renew-timer") || (config_pair.first == "rebind-timer") || (config_pair.first == "preferred-lifetime") || -- 2.47.2