From: Marcin Siodelski Date: Tue, 5 Mar 2019 19:43:24 +0000 (+0100) Subject: [#488,!259] Regenerated get_config_unittests for v4 and corrected issues. X-Git-Tag: 494-dhcp4configparser-sharednetworkssanitychecks-is-buggy_base~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e54dfbedc61438c052c5a38a5ff9cd19cbe84589;p=thirdparty%2Fkea.git [#488,!259] Regenerated get_config_unittests for v4 and corrected issues. --- diff --git a/src/bin/dhcp4/tests/config_parser_unittest.cc b/src/bin/dhcp4/tests/config_parser_unittest.cc index f77955c1da..95d238c475 100644 --- a/src/bin/dhcp4/tests/config_parser_unittest.cc +++ b/src/bin/dhcp4/tests/config_parser_unittest.cc @@ -6400,7 +6400,6 @@ TEST_F(Dhcp4ParserTest, globalReservations) { // This test verifies that configuration control with unsupported type fails TEST_F(Dhcp4ParserTest, configControlInfoNoFactory) { string config = PARSER_CONFIGS[6]; - extractConfig(config); // Should fail because "type=mysql" has no factories. configure(config, CONTROL_RESULT_ERROR, @@ -6410,7 +6409,6 @@ TEST_F(Dhcp4ParserTest, configControlInfoNoFactory) { // This test verifies that configuration control info gets populated. TEST_F(Dhcp4ParserTest, configControlInfo) { string config = PARSER_CONFIGS[6]; - extractConfig(config); // Should be able to register a backend factory for "mysql". ASSERT_TRUE(TestConfigBackendDHCPv4:: diff --git a/src/bin/dhcp4/tests/get_config_unittest.cc b/src/bin/dhcp4/tests/get_config_unittest.cc index 355e8f71fc..e6090558fc 100644 --- a/src/bin/dhcp4/tests/get_config_unittest.cc +++ b/src/bin/dhcp4/tests/get_config_unittest.cc @@ -2000,6 +2000,56 @@ const char* EXTRACTED_CONFIGS[] = { " }\n" " ],\n" " \"valid-lifetime\": 4000\n" +" }\n", + // CONFIGURATION 67 +"{\n" +" \"interfaces-config\": {\n" +" \"interfaces\": [ \"*\" ],\n" +" \"re-detect\": false\n" +" },\n" +" \"shared-networks\": [\n" +" {\n" +" \"calculate-tee-times\": true,\n" +" \"name\": \"foo\",\n" +" \"subnet4\": [\n" +" {\n" +" \"calculate-tee-times\": false,\n" +" \"id\": 100,\n" +" \"pools\": [\n" +" {\n" +" \"pool\": \"192.0.1.1-192.0.1.10\"\n" +" }\n" +" ],\n" +" \"subnet\": \"192.0.1.0/24\",\n" +" \"t1-percent\": 0.45,\n" +" \"t2-percent\": 0.65\n" +" },\n" +" {\n" +" \"id\": 200,\n" +" \"pools\": [\n" +" {\n" +" \"pool\": \"192.0.2.1-192.0.2.10\"\n" +" }\n" +" ],\n" +" \"subnet\": \"192.0.2.0/24\"\n" +" }\n" +" ],\n" +" \"t1-percent\": 0.4,\n" +" \"t2-percent\": 0.75\n" +" }\n" +" ],\n" +" \"subnet4\": [\n" +" {\n" +" \"id\": 300,\n" +" \"pools\": [\n" +" {\n" +" \"pool\": \"192.0.3.0 - 192.0.3.15\"\n" +" }\n" +" ],\n" +" \"subnet\": \"192.0.3.0/24\"\n" +" }\n" +" ],\n" +" \"valid-lifetime\": 4000\n" " }\n" }; @@ -2118,6 +2168,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -2136,6 +2187,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -2199,6 +2252,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -2217,6 +2271,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -2281,6 +2337,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -2300,6 +2357,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -2364,6 +2423,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -2383,6 +2443,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -2391,6 +2453,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 2,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -2410,6 +2473,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.3.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -2418,6 +2483,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 3,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -2437,6 +2503,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.4.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -2445,6 +2513,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 4,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -2464,6 +2533,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.5.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -2528,6 +2599,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1024,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -2547,6 +2619,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -2555,6 +2629,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 100,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -2574,6 +2649,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.3.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -2582,6 +2659,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -2601,6 +2679,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.4.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -2609,6 +2689,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 34,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -2628,6 +2709,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.5.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -2695,6 +2778,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"bar\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"1.2.3.4\",\n" @@ -2714,6 +2798,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"foo\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -2778,6 +2864,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"bar\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"1.2.3.4\",\n" @@ -2797,6 +2884,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"foo\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -2864,6 +2953,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"bootfile.efi\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"1.2.3.4\",\n" @@ -2883,6 +2973,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"some-name.example.org\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -2947,6 +3039,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -2966,6 +3059,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -3030,6 +3125,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -3049,6 +3145,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -3113,6 +3211,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -3132,6 +3231,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -3140,6 +3241,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 2,\n" " \"match-client-id\": false,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -3159,6 +3261,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.3.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -3224,6 +3328,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": false,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -3243,6 +3348,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -3251,6 +3358,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 2,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -3270,6 +3378,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.3.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -3334,6 +3444,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": true,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -3353,6 +3464,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -3361,6 +3474,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 2,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -3380,6 +3494,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.3.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -3445,6 +3561,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -3464,6 +3581,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -3472,6 +3591,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": true,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 2,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -3491,6 +3611,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.3.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -3555,6 +3677,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -3574,6 +3697,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4\n" " }\n" " ],\n" @@ -3638,6 +3763,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -3661,6 +3787,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -3669,6 +3797,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 2,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -3692,6 +3821,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.3.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -3756,6 +3887,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -3775,6 +3907,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -4299,6 +4433,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -4318,6 +4453,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -4382,6 +4519,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -4418,6 +4556,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -4509,6 +4649,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -4528,6 +4669,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -4736,6 +4879,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -4755,6 +4899,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 3000\n" " }\n" " ],\n" @@ -4828,6 +4974,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -4864,6 +5011,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -4928,6 +5077,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -4956,6 +5106,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -4964,6 +5116,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 2,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -4992,6 +5145,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.3.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -5056,6 +5211,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -5092,6 +5248,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -5156,6 +5314,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -5197,6 +5356,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -5278,6 +5439,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -5297,6 +5459,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -5496,6 +5660,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -5515,6 +5680,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 3000\n" " }\n" " ],\n" @@ -5594,6 +5761,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -5613,6 +5781,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -5696,6 +5866,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -5715,6 +5886,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -5889,6 +6062,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -5908,6 +6082,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -5972,6 +6148,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -5991,6 +6168,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4\n" " }\n" " ],\n" @@ -6055,6 +6234,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -6074,6 +6254,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4\n" " }\n" " ],\n" @@ -6138,6 +6320,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"client-class\": \"alpha\",\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" @@ -6158,6 +6341,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -6166,6 +6351,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"client-class\": \"beta\",\n" " \"id\": 2,\n" " \"match-client-id\": true,\n" @@ -6186,6 +6372,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.3.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -6194,6 +6382,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"client-class\": \"gamma\",\n" " \"id\": 3,\n" " \"match-client-id\": true,\n" @@ -6214,6 +6403,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.4.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -6222,6 +6413,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 4,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -6241,6 +6433,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.5.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -6305,6 +6499,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -6339,6 +6534,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.0.0/16\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -6403,6 +6600,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 123,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -6422,6 +6620,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -6430,6 +6630,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 234,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -6504,6 +6705,8 @@ const char* UNPARSED_CONFIGS[] = { " ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.3.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -6512,6 +6715,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 542,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -6579,6 +6783,8 @@ const char* UNPARSED_CONFIGS[] = { " ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.4.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -6653,6 +6859,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 234,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -6692,6 +6899,8 @@ const char* UNPARSED_CONFIGS[] = { " ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.3.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -6756,6 +6965,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -6775,6 +6985,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -6783,6 +6995,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 2,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -6802,6 +7015,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.3.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -6810,6 +7025,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 3,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -6829,6 +7045,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.4.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -6837,6 +7055,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 4,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -6856,6 +7075,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.5.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -6921,6 +7142,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -6940,6 +7162,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -6948,6 +7172,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 2,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -6967,6 +7192,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.3.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -7239,6 +7466,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -7258,6 +7486,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -7322,6 +7552,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"2001:db8::123/45\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -7341,6 +7572,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -7405,6 +7638,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -7424,6 +7658,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -7488,6 +7724,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"2001:db8::543/21\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -7507,6 +7744,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -7571,6 +7810,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -7590,6 +7830,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -7680,6 +7922,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -7699,6 +7942,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -7763,6 +8008,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -7782,6 +8028,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -7846,6 +8094,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -7866,6 +8115,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -7930,6 +8181,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -7954,6 +8206,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -8018,6 +8272,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 1,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -8042,6 +8297,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" @@ -8230,6 +8487,7 @@ const char* UNPARSED_CONFIGS[] = { " {\n" " \"comment\": \"A shared network\",\n" " \"authoritative\": false,\n" +" \"calculate-tee-times\": false,\n" " \"match-client-id\": true,\n" " \"name\": \"foo\",\n" " \"option-data\": [ ],\n" @@ -8245,6 +8503,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 100,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -8284,9 +8543,13 @@ const char* UNPARSED_CONFIGS[] = { " ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.1.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 7200\n" " }\n" " ],\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 7200\n" " }\n" " ],\n" @@ -8406,6 +8669,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 123,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -8425,6 +8689,8 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " },\n" " {\n" @@ -8433,6 +8699,7 @@ const char* UNPARSED_CONFIGS[] = { " \"4o6-subnet\": \"\",\n" " \"authoritative\": false,\n" " \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" " \"id\": 542,\n" " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" @@ -8452,6 +8719,163 @@ const char* UNPARSED_CONFIGS[] = { " \"reservations\": [ ],\n" " \"server-hostname\": \"\",\n" " \"subnet\": \"192.0.4.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" +" \"valid-lifetime\": 4000\n" +" }\n" +" ],\n" +" \"valid-lifetime\": 4000\n" +" }\n", + // CONFIGURATION 67 +"{\n" +" \"decline-probation-period\": 86400,\n" +" \"dhcp-ddns\": {\n" +" \"enable-updates\": false,\n" +" \"generated-prefix\": \"myhost\",\n" +" \"hostname-char-replacement\": \"\",\n" +" \"hostname-char-set\": \"\",\n" +" \"max-queue-size\": 1024,\n" +" \"ncr-format\": \"JSON\",\n" +" \"ncr-protocol\": \"UDP\",\n" +" \"override-client-update\": false,\n" +" \"override-no-update\": false,\n" +" \"qualifying-suffix\": \"\",\n" +" \"replace-client-name\": \"never\",\n" +" \"sender-ip\": \"0.0.0.0\",\n" +" \"sender-port\": 0,\n" +" \"server-ip\": \"127.0.0.1\",\n" +" \"server-port\": 53001\n" +" },\n" +" \"dhcp-queue-control\": {\n" +" \"capacity\": 500,\n" +" \"enable-queue\": false,\n" +" \"queue-type\": \"kea-ring4\"\n" +" },\n" +" \"dhcp4o6-port\": 0,\n" +" \"echo-client-id\": true,\n" +" \"expired-leases-processing\": {\n" +" \"flush-reclaimed-timer-wait-time\": 25,\n" +" \"hold-reclaimed-time\": 3600,\n" +" \"max-reclaim-leases\": 100,\n" +" \"max-reclaim-time\": 250,\n" +" \"reclaim-timer-wait-time\": 10,\n" +" \"unwarned-reclaim-cycles\": 5\n" +" },\n" +" \"hooks-libraries\": [ ],\n" +" \"host-reservation-identifiers\": [ \"hw-address\", \"duid\", \"circuit-id\", \"client-id\" ],\n" +" \"interfaces-config\": {\n" +" \"interfaces\": [ \"*\" ],\n" +" \"re-detect\": false\n" +" },\n" +" \"lease-database\": {\n" +" \"type\": \"memfile\"\n" +" },\n" +" \"option-data\": [ ],\n" +" \"option-def\": [ ],\n" +" \"sanity-checks\": {\n" +" \"lease-checks\": \"warn\"\n" +" },\n" +" \"shared-networks\": [\n" +" {\n" +" \"authoritative\": false,\n" +" \"calculate-tee-times\": true,\n" +" \"match-client-id\": true,\n" +" \"name\": \"foo\",\n" +" \"option-data\": [ ],\n" +" \"relay\": {\n" +" \"ip-addresses\": [ ]\n" +" },\n" +" \"reservation-mode\": \"all\",\n" +" \"subnet4\": [\n" +" {\n" +" \"4o6-interface\": \"\",\n" +" \"4o6-interface-id\": \"\",\n" +" \"4o6-subnet\": \"\",\n" +" \"authoritative\": false,\n" +" \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" +" \"id\": 100,\n" +" \"match-client-id\": true,\n" +" \"next-server\": \"0.0.0.0\",\n" +" \"option-data\": [ ],\n" +" \"pools\": [\n" +" {\n" +" \"option-data\": [ ],\n" +" \"pool\": \"192.0.1.1-192.0.1.10\"\n" +" }\n" +" ],\n" +" \"relay\": {\n" +" \"ip-addresses\": [ ]\n" +" },\n" +" \"reservation-mode\": \"all\",\n" +" \"reservations\": [ ],\n" +" \"server-hostname\": \"\",\n" +" \"subnet\": \"192.0.1.0/24\",\n" +" \"t1-percent\": 0.45,\n" +" \"t2-percent\": 0.65,\n" +" \"valid-lifetime\": 4000\n" +" },\n" +" {\n" +" \"4o6-interface\": \"\",\n" +" \"4o6-interface-id\": \"\",\n" +" \"4o6-subnet\": \"\",\n" +" \"authoritative\": false,\n" +" \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": true,\n" +" \"id\": 200,\n" +" \"match-client-id\": true,\n" +" \"next-server\": \"0.0.0.0\",\n" +" \"option-data\": [ ],\n" +" \"pools\": [\n" +" {\n" +" \"option-data\": [ ],\n" +" \"pool\": \"192.0.2.1-192.0.2.10\"\n" +" }\n" +" ],\n" +" \"relay\": {\n" +" \"ip-addresses\": [ ]\n" +" },\n" +" \"reservation-mode\": \"all\",\n" +" \"reservations\": [ ],\n" +" \"server-hostname\": \"\",\n" +" \"subnet\": \"192.0.2.0/24\",\n" +" \"t1-percent\": 0.4,\n" +" \"t2-percent\": 0.75,\n" +" \"valid-lifetime\": 4000\n" +" }\n" +" ],\n" +" \"t1-percent\": 0.4,\n" +" \"t2-percent\": 0.75,\n" +" \"valid-lifetime\": 4000\n" +" }\n" +" ],\n" +" \"subnet4\": [\n" +" {\n" +" \"4o6-interface\": \"\",\n" +" \"4o6-interface-id\": \"\",\n" +" \"4o6-subnet\": \"\",\n" +" \"authoritative\": false,\n" +" \"boot-file-name\": \"\",\n" +" \"calculate-tee-times\": false,\n" +" \"id\": 300,\n" +" \"match-client-id\": true,\n" +" \"next-server\": \"0.0.0.0\",\n" +" \"option-data\": [ ],\n" +" \"pools\": [\n" +" {\n" +" \"option-data\": [ ],\n" +" \"pool\": \"192.0.3.0/28\"\n" +" }\n" +" ],\n" +" \"relay\": {\n" +" \"ip-addresses\": [ ]\n" +" },\n" +" \"reservation-mode\": \"all\",\n" +" \"reservations\": [ ],\n" +" \"server-hostname\": \"\",\n" +" \"subnet\": \"192.0.3.0/24\",\n" +" \"t1-percent\": 0.5,\n" +" \"t2-percent\": 0.875,\n" " \"valid-lifetime\": 4000\n" " }\n" " ],\n" diff --git a/src/bin/dhcp4/tests/get_config_unittest.cc.skel b/src/bin/dhcp4/tests/get_config_unittest.cc.skel index 37958a2abd..ca2e8f2c9b 100644 --- a/src/bin/dhcp4/tests/get_config_unittest.cc.skel +++ b/src/bin/dhcp4/tests/get_config_unittest.cc.skel @@ -1,4 +1,4 @@ -// Copyright (C) 2017-2018 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2017-2019 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dhcpsrv/network.cc b/src/lib/dhcpsrv/network.cc index ae57abdcef..f78612231d 100644 --- a/src/lib/dhcpsrv/network.cc +++ b/src/lib/dhcpsrv/network.cc @@ -187,10 +187,18 @@ Network::toElement() const { map->set("option-data", opts->toElement()); // Output calcualte-tee-times and percentages if calculation is enabled. - bool calc_tee_times = getCalculateTeeTimes(); - if (calc_tee_times) { + auto calc_tee_times = getCalculateTeeTimes(); + if (!calc_tee_times.unspecified()) { map->set("calculate-tee-times", Element::create(calc_tee_times)); + } + + auto t1_percent = getT1Percent(); + if (!t1_percent.unspecified()) { map->set("t1-percent", Element::create(getT1Percent())); + } + + auto t2_percent = getT2Percent(); + if (!t2_percent.unspecified()) { map->set("t2-percent", Element::create(getT2Percent())); } diff --git a/src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc b/src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc index c0984b26f9..59f9cb0705 100644 --- a/src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc +++ b/src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc @@ -872,7 +872,7 @@ TEST(CfgSubnets4Test, unparseSubnet) { Subnet4Ptr subnet3(new Subnet4(IOAddress("192.0.2.128"), 26, 1, 2, 3, 125)); subnet1->allowClientClass("foo"); - // These two should not appear, as calculateTeeTimes should be false. + subnet1->setT1Percent(0.45); subnet1->setT2Percent(0.70); @@ -901,6 +901,8 @@ TEST(CfgSubnets4Test, unparseSubnet) { " \"comment\": \"foo\",\n" " \"id\": 123,\n" " \"subnet\": \"192.0.2.0/26\",\n" + " \"t1-percent\": 0.45," + " \"t2-percent\": 0.7," " \"match-client-id\": true,\n" " \"next-server\": \"0.0.0.0\",\n" " \"server-hostname\": \"\",\n"