]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#490,!284] Extended commentary per review comments.
authorMarcin Siodelski <marcin@isc.org>
Wed, 27 Mar 2019 19:36:43 +0000 (20:36 +0100)
committerMarcin Siodelski <marcin@isc.org>
Wed, 27 Mar 2019 19:45:14 +0000 (20:45 +0100)
src/bin/dhcp4/json_config_parser.cc
src/bin/dhcp6/json_config_parser.cc

index 05f10d1cbd4b21c5a4741dba8446ccd33fed0aa0..cd0bbb372cb455dced6d62d18139e9070f7c623b 100644 (file)
@@ -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") ||
index c3b1562e0f699e50bd23b2f5b254cfd8c4fa79d1..89d9e3d1b267752a21ed0900c7e5f23c779deb67 100644 (file)
@@ -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") ||