]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#365,!296] Addressed review comments.
authorThomas Markwalder <tmark@isc.org>
Tue, 23 Apr 2019 15:49:08 +0000 (11:49 -0400)
committerThomas Markwalder <tmark@isc.org>
Fri, 26 Apr 2019 15:19:33 +0000 (11:19 -0400)
ChangeLog
doc/examples/kea6/tee-times.json [new file with mode: 0644]
doc/guide/dhcp6-srv.xml
src/bin/dhcp6/dhcp6_srv.cc
src/bin/dhcp6/tests/get_config_unittest.cc
src/bin/dhcp6/tests/simple_parser6_unittest.cc
src/bin/dhcp6/tests/tee_times_unittest.cc
src/lib/dhcpsrv/parsers/dhcp_parsers.cc
src/lib/dhcpsrv/parsers/simple_parser6.cc

index 4b063567bf7ec6a8f90c8fce6891a07c0fd0bab5..bf98bd977c91e3e0f8cb9aa27e01a9029e9d5d03 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
 1566.  [func]          tmark
        kea-dhcp6 can now be configured to calculate values to
-       send to clients for for T1 and T2 times. Prior to this
+       send to clients for T1 and T2 times. Prior to this
        it was only possibly to specify explicit values.
        (Gitlab #365,!296, git TBD)
 
diff --git a/doc/examples/kea6/tee-times.json b/doc/examples/kea6/tee-times.json
new file mode 100644 (file)
index 0000000..034fe1b
--- /dev/null
@@ -0,0 +1,72 @@
+// This is an example configuration file for DHCPv6 server in Kea.
+// It's a basic scenario with three IPv6 subnets use different
+// methods for determining T1 and T2 values.
+
+{ "Dhcp6":
+
+{
+// Kea is told to listen on ethX interface only.
+  "interfaces-config": {
+    "interfaces": [ "ethX" ]
+  },
+
+// We need to specify the the database used to store leases. As of
+// September 2016, four database backends are supported: MySQL,
+// PostgreSQL, Cassandra, and the in-memory database, Memfile.
+// We'll use memfile  because it doesn't require any prior set up.
+  "lease-database": {
+    "type": "memfile"
+  },
+
+// Addresses will be assigned with preferred and valid lifetimes
+// being 3000 and 4000, respectively.  By default calculate-tee-times
+// is true with values of .5 and .8 for t1-percent and t2-percent
+// respectively.  Since some of our subnets will use calculated values and
+// we must NOT specify global values for renew-timer and rebind-timer.
+  "preferred-lifetime": 3000,
+  "valid-lifetime": 4000,
+
+// The following list defines subnets. Each subnet consists of at
+// least subnet and pool entries.
+  "subnet6": [
+  {    
+        //  This subnet use default calculation
+        "subnet": "2001:db8:1::/64",
+        "pools": [ { "pool": "2001:db8:1::/80" } ]
+  },
+  {    
+        // This subnet will use explicit values. Explict
+        // values override calculation.
+       "subnet": "2001:db8:2::/64",
+       "pools": [ { "pool": "2001:db8:2::/80" } ],
+       "renew-timer":  1000,
+       "rebind-timer": 2000
+  },
+  {    
+        // This subnet will use custom percents
+       "subnet": "2001:db8:3::/64",
+       "pools": [ { "pool": "2001:db8:3::/80" } ],
+       "t1-percent": .45,
+       "t2-percent": .7
+  }]
+},
+
+// The following configures logging. It assumes that messages with at
+// least informational level (info, warn, error and fatal) should be
+// logged to stdout.
+"Logging": {
+    "loggers": [
+        {
+            "name": "kea-dhcp6",
+            "output_options": [
+                {
+                    "output": "stdout"
+                }
+            ],
+            "debuglevel": 0,
+            "severity": "INFO"
+        }
+    ]
+}
+
+}
index fdce353e02e3213cb17b38dc04bc2672858703ab..ad191e66984387d3d7a1415b1274e55b663f7f5f 100644 (file)
@@ -2047,13 +2047,13 @@ should include options from the new option space:
     <section xml:id="dhcp6-t1-t2-times">
       <title>Controlling the Values Sent for T1 and T2 Times</title>
       According to <link xmlns:xlink="http://www.w3.org/1999/xlink"
-      xlink:href="http://tools.ietf.org/html/rfc3315">RFC 3315</link>,
+      xlink:href="http://tools.ietf.org/html/rfc8415">RFC 8415, section 21.4</link>,
       servers should send values for T1 and T2 that are 50% and 80%
-      of the lease life time, repsectively.  By default, kea-dhcp6 will
-      send zero for both values.  It can be configured to send values that
-      are specified explicitly or that are calculated as percentages of
-      the valid lease time.  The server's behavior is governed by combination of
-      configuration parameters, two of which have already been mentioned.
+      of the preferred lease time, repsectively.  Kea can be configured
+      to send values that are specified explicitly or that are calculated as
+      percentages of the valid lease time.  The server's behavior is governed
+      by combination of configuration parameters, two of which have already been
+      mentioned.
       <para>
       To send specific, fixed values use the following two parameters:
       <itemizedlist>
@@ -2068,9 +2068,9 @@ should include options from the new option space:
           </simpara>
         </listitem>
       </itemizedlist>
-      The server will only send T2 if it is less than valid lease time.  T1 will
-      only be sent if a: T2 is being sent and T1 is less than T2 or b: T2 is not being
-      sent and T1 is less than the valid lease time.
+      The server will only use T2 if it is less than valid lease time, otherwise it will
+      be set to 0.  T1 will only be use if it is less than T2, otherwise it will be
+      set to 0.
       </para>
       <para>
       Calculating the values is controlled by the following three parameters.
@@ -2078,7 +2078,7 @@ should include options from the new option space:
         <listitem>
           <simpara>
             <command>calculate-tee-times</command> - when true, T1 and T2 will be
-            calculated as percentages of the valid lease time. It defaults to false.
+            calculated as percentages of the valid lease time. It defaults to true.
           </simpara>
         </listitem>
         <listitem>
index 3a02ac87b63fb12e4028a88ba7b89a992c37334f..50148680816ca595462f29baa9186230851429a1 100644 (file)
@@ -1926,7 +1926,7 @@ Dhcpv6Srv::assignIA_PD(const Pkt6Ptr& query, const Pkt6Ptr& /*answer*/,
              l != leases.end(); ++l) {
 
             // Check for new minimum lease time
-            if (min_valid_lft > (*l)->valid_lft_) {
+            if (((*l)->valid_lft_ > 0) && (min_valid_lft > (*l)->valid_lft_)) {
                 min_valid_lft = (*l)->valid_lft_;
             }
 
@@ -2077,7 +2077,7 @@ Dhcpv6Srv::extendIA_NA(const Pkt6Ptr& query, const Pkt6Ptr& answer,
         ia_rsp->addOption(iaaddr);
 
         // Check for new minimum lease time
-        if ((*l)->valid_lft_ < min_valid_lft) {
+        if (((*l)->valid_lft_ > 0) && (min_valid_lft > (*l)->valid_lft_)) {
             min_valid_lft = (*l)->valid_lft_;
         }
 
index 0d5730623dda636a5d71f45307bef5a50abfe8b1..b581ce5cfa47fcc7ed4d38f94fec5ef59478c3a5 100644 (file)
@@ -1836,7 +1836,7 @@ const char* EXTRACTED_CONFIGS[] = {
 const char* UNPARSED_CONFIGS[] = {
     // CONFIGURATION 0
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -1906,7 +1906,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 1
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -1971,7 +1971,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -2002,7 +2002,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 2
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -2067,7 +2067,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -2092,7 +2092,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 2,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -2117,7 +2117,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 3,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -2142,7 +2142,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 4,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -2173,7 +2173,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 3
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -2238,7 +2238,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1024,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -2263,7 +2263,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 100,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -2288,7 +2288,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -2313,7 +2313,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 34,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -2344,7 +2344,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 4
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -2409,7 +2409,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -2434,7 +2434,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 2,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -2459,7 +2459,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 3,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -2484,7 +2484,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 4,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -2515,7 +2515,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 5
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -2580,7 +2580,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -2611,7 +2611,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 6
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -2676,7 +2676,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"interface\": \"eth0\",\n"
 "                \"option-data\": [ ],\n"
@@ -2708,7 +2708,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 7
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -2773,7 +2773,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"interface-id\": \"foobar\",\n"
 "                \"option-data\": [ ],\n"
@@ -2805,7 +2805,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 8
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -2870,7 +2870,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -2899,7 +2899,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 2,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -2934,7 +2934,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 9
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -2999,7 +2999,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -3030,7 +3030,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 10
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -3095,7 +3095,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [\n"
@@ -3128,7 +3128,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 11
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -3193,7 +3193,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [\n"
@@ -3228,7 +3228,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 12
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -3293,7 +3293,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [\n"
@@ -3343,7 +3343,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 13
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -3408,7 +3408,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [\n"
@@ -3441,7 +3441,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 14
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -3519,7 +3519,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 15
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -3597,7 +3597,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 16
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -3684,7 +3684,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 17
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -3762,7 +3762,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 18
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -3840,7 +3840,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 19
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -3922,7 +3922,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -3953,7 +3953,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 20
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -4018,7 +4018,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [\n"
 "                    {\n"
@@ -4066,7 +4066,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 21
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -4158,7 +4158,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -4189,7 +4189,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 22
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -4295,7 +4295,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 23
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -4413,7 +4413,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -4444,7 +4444,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 24
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -4509,7 +4509,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [\n"
 "                    {\n"
@@ -4543,7 +4543,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 2,\n"
 "                \"option-data\": [\n"
 "                    {\n"
@@ -4583,7 +4583,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 25
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -4648,7 +4648,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [\n"
@@ -4732,7 +4732,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 26
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -4812,7 +4812,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -4843,7 +4843,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 27
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -4927,7 +4927,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -4958,7 +4958,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 28
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -5028,7 +5028,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 29
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -5098,7 +5098,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 30
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -5163,7 +5163,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -5194,7 +5194,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 31
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -5259,7 +5259,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -5290,7 +5290,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 32
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -5355,7 +5355,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"client-class\": \"alpha\",\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -5381,7 +5381,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"client-class\": \"beta\",\n"
 "                \"id\": 2,\n"
 "                \"option-data\": [ ],\n"
@@ -5407,7 +5407,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"client-class\": \"gamma\",\n"
 "                \"id\": 3,\n"
 "                \"option-data\": [ ],\n"
@@ -5433,7 +5433,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 4,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -5464,7 +5464,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 33
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -5529,7 +5529,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -5575,7 +5575,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 34
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -5640,7 +5640,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [\n"
@@ -5694,7 +5694,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 35
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": true,\n"
@@ -5759,7 +5759,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -5790,7 +5790,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 36
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -5855,7 +5855,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 123,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -5880,7 +5880,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 234,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -5951,7 +5951,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 542,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -6011,7 +6011,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 37
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -6086,7 +6086,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 234,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -6130,7 +6130,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 38
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -6200,7 +6200,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 39
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -6270,7 +6270,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 40
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -6335,7 +6335,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -6360,7 +6360,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 2,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -6385,7 +6385,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 3,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -6410,7 +6410,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 4,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -6435,7 +6435,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 5,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -6466,7 +6466,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 41
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -6531,7 +6531,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -6556,7 +6556,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 2,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -6587,7 +6587,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 42
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -6657,7 +6657,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 43
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -6725,7 +6725,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 44
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -6793,7 +6793,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 45
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 12345,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -6861,7 +6861,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 46
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -6929,7 +6929,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 47
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"client-classes\": [\n"
 "            {\n"
 "                \"name\": \"one\",\n"
@@ -7008,7 +7008,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -7039,7 +7039,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 48
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -7104,7 +7104,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -7135,7 +7135,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 49
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -7200,7 +7200,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -7232,7 +7232,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 50
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -7297,7 +7297,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -7334,7 +7334,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 51
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -7399,7 +7399,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -7436,7 +7436,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 52
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -7501,7 +7501,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [\n"
@@ -7534,7 +7534,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 53
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -7599,7 +7599,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [\n"
@@ -7633,7 +7633,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 54
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -7698,7 +7698,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [\n"
@@ -7737,7 +7737,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 55
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -7822,7 +7822,7 @@ const char* UNPARSED_CONFIGS[] = {
     // CONFIGURATION 56
 "{\n"
 "        \"comment\": \"A DHCPv6 server\",\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"client-classes\": [\n"
 "            {\n"
 "                \"comment\": \"match all\",\n"
@@ -7934,7 +7934,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [\n"
 "            {\n"
 "                \"comment\": \"A shared network\",\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"interface\": \"\",\n"
 "                \"name\": \"foo\",\n"
 "                \"option-data\": [ ],\n"
@@ -7947,7 +7947,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"subnet6\": [\n"
 "                    {\n"
 "                        \"comment\": \"A subnet\",\n"
-"                        \"calculate-tee-times\": false,\n"
+"                        \"calculate-tee-times\": true,\n"
 "                        \"id\": 100,\n"
 "                        \"option-data\": [ ],\n"
 "                        \"pd-pools\": [\n"
@@ -8011,7 +8011,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 57
 "{\n"
-"        \"calculate-tee-times\": false,\n"
+"        \"calculate-tee-times\": true,\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"enable-updates\": false,\n"
@@ -8128,7 +8128,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 123,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -8153,7 +8153,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 234,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
@@ -8173,7 +8173,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
-"                \"calculate-tee-times\": false,\n"
+"                \"calculate-tee-times\": true,\n"
 "                \"id\": 542,\n"
 "                \"option-data\": [ ],\n"
 "                \"pd-pools\": [ ],\n"
index 730d566fc808951e726f318a82c008a9fdd4ab65..2703e7be1bf70a5804506cb823f8a0c968bb368e 100644 (file)
@@ -121,7 +121,7 @@ public:
 
         // Now try to get the element being checked
         ConstElementPtr elem = map->get(param_name);
-        ASSERT_FALSE(elem) << "param was found found: " << param_name;
+        ASSERT_FALSE(elem) << "param was found but not expected: " << param_name;
     }
 
 };
@@ -139,7 +139,7 @@ TEST_F(SimpleParser6Test, globalDefaults6) {
 
     checkIntegerValue(empty, "valid-lifetime", 7200);
     checkIntegerValue(empty, "preferred-lifetime", 3600);
-    checkBoolValue(empty, "calculate-tee-times", false);
+    checkBoolValue(empty, "calculate-tee-times", true);
     checkDoubleValue(empty, "t1-percent", 0.5);
     checkDoubleValue(empty, "t2-percent", 0.8);
 
index 1f33980ccc9fa9f6ed4cf7ab9ac3dffe969aa375..e3b042686cf9e71073c38b961ad212ff8d8a8cc2 100644 (file)
@@ -30,10 +30,7 @@ namespace {
 ///
 const char* TEE_CONFIGS[] = {
     // Configuration 0, Timers explicitly set
-    "{ \n" 
-    "   \"interfaces-config\": { \n"
-    "       \"interfaces\": [ \"*\" ] \n"
-    "   }, \n"
+    "{ \n"
     "   \"renew-timer\": 1000, \n"
     "   \"rebind-timer\": 2000, \n"
     "   \"preferred-lifetime\": 3000, \n"
@@ -51,11 +48,7 @@ const char* TEE_CONFIGS[] = {
     "   }] \n"
     "} \n"
     , // Configuration 1, Calculate default timers
-    "{ \n" 
-    "   \"interfaces-config\": { \n"
-    "       \"interfaces\": [ \"*\" ] \n"
-    "   }, \n"
-    "   \"calculate-tee-times\": true, \n"
+    "{ \n"
     "   \"preferred-lifetime\": 3000, \n"
     "   \"valid-lifetime\": 4000, \n"
     "   \"subnet6\": [ { \n"
@@ -70,6 +63,24 @@ const char* TEE_CONFIGS[] = {
     "       }] \n"
     "   }] \n"
     "} \n"
+    , // Configuration 2, Calculate custom timers
+    "{ \n"
+    "   \"preferred-lifetime\": 3000, \n"
+    "   \"valid-lifetime\": 4000, \n"
+    "   \"t1-percent\": .45, \n"
+    "   \"t2-percent\": .70, \n"
+    "   \"subnet6\": [ { \n"
+    "       \"interface\": \"eth0\", \n"
+    "       \"subnet\": \"2001:db8:1::/48\", \n"
+    "       \"pools\": [ { \"pool\": \"2001:db8:1::/64\" } ], \n"
+    "       \"pd-pools\": [ \n"
+    "       { \n"
+    "           \"prefix\": \"3000::\", \n "
+    "           \"prefix-len\": 72, \n"
+    "           \"delegated-len\": 80 \n"
+    "       }] \n"
+    "   }] \n"
+    "} \n"
 };
 
 /// @brief Test fixture class for testing Rebind.
@@ -83,7 +94,7 @@ public:
         : Dhcpv6MessageTest() {
     }
 
-    void genRequest(const std::string& config, Dhcp6Client& client, 
+    void genRequest(const std::string& config, Dhcp6Client& client,
                     uint32_t exp_leases) {
         // Configure the server.
         ASSERT_NO_THROW(configure(config, *client.getServer()));
@@ -99,6 +110,8 @@ public:
     }
 };
 
+// This test verifies that explict values for renew-timer and
+// rebind-timer are used when given.
 TEST_F(TeeTest, explicitTimers) {
     Dhcp6Client client;
 
@@ -139,7 +152,10 @@ TEST_F(TeeTest, explicitTimers) {
     EXPECT_EQ(2000, actual_t2);
 }
 
-TEST_F(TeeTest, calculateTimers) {
+// This test verifies that T1 and T2 are calculated by
+// default when explicit values for renew-timer
+// and rebind-timer are not present.
+TEST_F(TeeTest, defaultTimers) {
     Dhcp6Client client;
 
     uint32_t na_iaid = 2222;
@@ -179,5 +195,48 @@ TEST_F(TeeTest, calculateTimers) {
     EXPECT_EQ(3200, actual_t2);
 }
 
+// This test verifies that custom percentags for T1 and T2
+// can be used for calculation.
+TEST_F(TeeTest, calculateTimers) {
+    Dhcp6Client client;
+
+    uint32_t na_iaid = 2222;
+    client.requestAddress(na_iaid);
+
+    uint32_t pd_iaid = 3333;
+    client.requestPrefix(pd_iaid);
+
+    uint32_t exp_leases = 2;
+
+    // Configure client to request IA_NA.
+    // Make 4-way exchange to get the lease.
+    ASSERT_NO_FATAL_FAILURE(genRequest(TEE_CONFIGS[2], client, exp_leases));
+
+    // Make sure the timers are right for both IAs
+    uint32_t actual_t1;
+    uint32_t actual_t2;
+
+    ASSERT_TRUE(client.getTeeTimes(na_iaid, actual_t1, actual_t2));
+    EXPECT_EQ(1800, actual_t1);
+    EXPECT_EQ(2800, actual_t2);
+
+    ASSERT_TRUE(client.getTeeTimes(pd_iaid, actual_t1, actual_t2));
+    EXPECT_EQ(1800, actual_t1);
+    EXPECT_EQ(2800, actual_t2);
+
+    // Let's renew the leases.
+    ASSERT_NO_THROW(client.doRenew());
+
+    // Now check the timers again.
+    ASSERT_TRUE(client.getTeeTimes(na_iaid, actual_t1, actual_t2));
+    EXPECT_EQ(1800, actual_t1);
+    EXPECT_EQ(2800, actual_t2);
+
+    ASSERT_TRUE(client.getTeeTimes(pd_iaid, actual_t1, actual_t2));
+    EXPECT_EQ(1800, actual_t1);
+    EXPECT_EQ(2800, actual_t2);
+}
+
+
 
 } // end of anonymous namespace
index eaf0ba982199ed8fbbe45959836c637b7f331aea..57c03c3547a960f9bd5ecb0adcb8e6f05e7280cb 100644 (file)
@@ -1176,9 +1176,8 @@ Subnet6ConfigParser::initSubnet(data::ConstElementPtr params,
 
     std::ostringstream output;
     output << addr << "/" << static_cast<int>(len)
-           << " with params t1=" << subnet6->getT1().get()
-           << ", t2=" << subnet6->getT2().get()
-           << ", preferred-lifetime=" << pref.get()
+           << " with params "
+           << " preferred-lifetime=" << pref.get()
            << ", valid-lifetime=" << subnet6->getValid().get()
            << ", rapid-commit is " << (rapid_commit ? "enabled" : "disabled");
 
index 6a2cd50b29d9c86e59e0e2a97af4030dbd0954e4..6e21c177fe889b849f9827584b3ff433f43770da 100644 (file)
@@ -106,7 +106,7 @@ const SimpleDefaults SimpleParser6::GLOBAL6_DEFAULTS = {
     { "dhcp4o6-port",             Element::integer, "0" },
     { "server-tag",               Element::string,  "" },
     { "reservation-mode",         Element::string,  "all" },
-    { "calculate-tee-times",      Element::boolean, "false" },
+    { "calculate-tee-times",      Element::boolean, "true" },
     { "t1-percent",               Element::real,    ".50" },
     { "t2-percent",               Element::real,    ".80" }
 };