]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[897-add-infinite-valid-lifetime] Added method
authorFrancis Dupont <fdupont@isc.org>
Mon, 9 Sep 2019 15:51:11 +0000 (17:51 +0200)
committerFrancis Dupont <fdupont@isc.org>
Mon, 9 Sep 2019 15:51:11 +0000 (17:51 +0200)
15 files changed:
src/bin/dhcp4/tests/get_config_unittest.cc
src/bin/dhcp6/tests/get_config_unittest.cc
src/lib/dhcpsrv/network.cc
src/lib/dhcpsrv/network.h
src/lib/dhcpsrv/parsers/dhcp_parsers.cc
src/lib/dhcpsrv/parsers/shared_network_parser.cc
src/lib/dhcpsrv/tests/cfg_shared_networks4_unittest.cc
src/lib/dhcpsrv/tests/cfg_shared_networks6_unittest.cc
src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc
src/lib/dhcpsrv/tests/cfg_subnets6_unittest.cc
src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
src/lib/dhcpsrv/tests/network_unittest.cc
src/lib/dhcpsrv/tests/shared_network_parser_unittest.cc
src/lib/dhcpsrv/tests/shared_network_unittest.cc
src/lib/dhcpsrv/tests/subnet_unittest.cc

index fe0078ad7f2941dc7113b8cbb9d80b484fcdbeb6..41a9a1becaaac27b8c6a1d0332627158d599c25c 100644 (file)
@@ -2264,6 +2264,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -2355,6 +2356,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -2449,6 +2451,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -2544,6 +2547,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -2572,6 +2576,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 2,\n"
@@ -2600,6 +2605,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 3,\n"
@@ -2628,6 +2634,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 4,\n"
@@ -2721,6 +2728,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1024,\n"
@@ -2749,6 +2757,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 100,\n"
@@ -2777,6 +2786,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -2805,6 +2815,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 34,\n"
@@ -2898,6 +2909,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"boot-file-name\": \"bar\",\n"
 "                \"calculate-tee-times\": false,\n"
@@ -2993,6 +3005,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"boot-file-name\": \"bar\",\n"
 "                \"calculate-tee-times\": false,\n"
@@ -3088,6 +3101,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"boot-file-name\": \"bootfile.efi\",\n"
 "                \"calculate-tee-times\": false,\n"
@@ -3183,6 +3197,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -3276,6 +3291,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -3369,6 +3385,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -3397,6 +3414,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 2,\n"
@@ -3490,6 +3508,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -3518,6 +3537,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 2,\n"
@@ -3611,6 +3631,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": true,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -3639,6 +3660,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 2,\n"
@@ -3732,6 +3754,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -3760,6 +3783,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": true,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 2,\n"
@@ -3855,6 +3879,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -3950,6 +3975,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -3982,6 +4008,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 2,\n"
@@ -4079,6 +4106,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -4702,6 +4730,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -4795,6 +4824,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -4932,6 +4962,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -5178,6 +5209,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -5280,6 +5312,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -5390,6 +5423,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -5427,6 +5461,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 2,\n"
@@ -5529,6 +5564,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -5639,6 +5675,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -5771,6 +5808,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -6008,6 +6046,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -6116,6 +6155,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -6228,6 +6268,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -6451,6 +6492,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -6546,6 +6588,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -6643,6 +6686,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -6736,6 +6780,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -6829,6 +6874,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -6922,6 +6968,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"client-class\": \"alpha\",\n"
@@ -6951,6 +6998,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"client-class\": \"beta\",\n"
@@ -6980,6 +7028,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"client-class\": \"gamma\",\n"
@@ -7009,6 +7058,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 4,\n"
@@ -7102,6 +7152,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -7210,6 +7261,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 123,\n"
@@ -7238,6 +7290,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 234,\n"
@@ -7321,6 +7374,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 542,\n"
@@ -7472,6 +7526,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 234,\n"
@@ -7585,6 +7640,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -7613,6 +7669,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 2,\n"
@@ -7641,6 +7698,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 3,\n"
@@ -7669,6 +7727,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 4,\n"
@@ -7762,6 +7821,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -7790,6 +7850,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 2,\n"
@@ -8131,6 +8192,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -8224,6 +8286,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"2001:db8::123/45\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -8317,6 +8380,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"ethX\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -8410,6 +8474,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"ethX\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"2001:db8::543/21\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -8503,6 +8568,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"vlan123\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -8622,6 +8688,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -8715,6 +8782,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -8808,6 +8876,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -8902,6 +8971,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -9000,6 +9070,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
@@ -9232,6 +9303,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [\n"
 "            {\n"
 "                \"comment\": \"A shared network\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"interface\": \"\",\n"
@@ -9249,6 +9321,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                        \"4o6-interface\": \"\",\n"
 "                        \"4o6-interface-id\": \"\",\n"
 "                        \"4o6-subnet\": \"\",\n"
+"                        \"allow-static-leases\": false,\n"
 "                        \"authoritative\": false,\n"
 "                        \"calculate-tee-times\": false,\n"
 "                        \"id\": 100,\n"
@@ -9423,6 +9496,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 123,\n"
@@ -9451,6 +9525,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 542,\n"
@@ -9538,6 +9613,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"server-tag\": \"\",\n"
 "        \"shared-networks\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"interface\": \"\",\n"
@@ -9554,6 +9630,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                        \"4o6-interface\": \"\",\n"
 "                        \"4o6-interface-id\": \"\",\n"
 "                        \"4o6-subnet\": \"\",\n"
+"                        \"allow-static-leases\": false,\n"
 "                        \"authoritative\": false,\n"
 "                        \"calculate-tee-times\": false,\n"
 "                        \"id\": 100,\n"
@@ -9580,6 +9657,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                        \"4o6-interface\": \"\",\n"
 "                        \"4o6-interface-id\": \"\",\n"
 "                        \"4o6-subnet\": \"\",\n"
+"                        \"allow-static-leases\": false,\n"
 "                        \"authoritative\": false,\n"
 "                        \"calculate-tee-times\": true,\n"
 "                        \"id\": 200,\n"
@@ -9613,6 +9691,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface\": \"\",\n"
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 300,\n"
index fbd3cba8995251456a082fcf4697d17935e9a1b4..e4847997ff6ad830f010f2a2079257053cf662d6 100644 (file)
@@ -2063,6 +2063,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"max-preferred-lifetime\": 4000,\n"
@@ -2162,6 +2163,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -2187,6 +2189,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 2,\n"
 "                \"option-data\": [ ],\n"
@@ -2212,6 +2215,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 3,\n"
 "                \"option-data\": [ ],\n"
@@ -2237,6 +2241,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 4,\n"
 "                \"option-data\": [ ],\n"
@@ -2332,6 +2337,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1024,\n"
 "                \"option-data\": [ ],\n"
@@ -2357,6 +2363,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 100,\n"
 "                \"option-data\": [ ],\n"
@@ -2382,6 +2389,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -2407,6 +2415,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 34,\n"
 "                \"option-data\": [ ],\n"
@@ -2502,6 +2511,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -2527,6 +2537,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 2,\n"
 "                \"option-data\": [ ],\n"
@@ -2552,6 +2563,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 3,\n"
 "                \"option-data\": [ ],\n"
@@ -2577,6 +2589,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 4,\n"
 "                \"option-data\": [ ],\n"
@@ -2676,6 +2689,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"max-preferred-lifetime\": 4,\n"
@@ -2775,6 +2789,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"interface\": \"eth0\",\n"
@@ -2871,6 +2886,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"interface-id\": \"foobar\",\n"
@@ -2967,6 +2983,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -2996,6 +3013,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 2,\n"
 "                \"option-data\": [ ],\n"
@@ -3095,6 +3113,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -3190,6 +3209,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -3287,6 +3307,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -3386,6 +3407,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -3500,6 +3522,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -4008,6 +4031,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -4103,6 +4127,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [\n"
@@ -4242,6 +4267,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -4495,6 +4521,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -4590,6 +4617,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [\n"
@@ -4624,6 +4652,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 2,\n"
 "                \"option-data\": [\n"
@@ -4728,6 +4757,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -4891,6 +4921,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -5005,6 +5036,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -5238,6 +5270,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -5333,6 +5366,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -5428,6 +5462,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"client-class\": \"alpha\",\n"
 "                \"id\": 1,\n"
@@ -5454,6 +5489,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"client-class\": \"beta\",\n"
 "                \"id\": 2,\n"
@@ -5480,6 +5516,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"client-class\": \"gamma\",\n"
 "                \"id\": 3,\n"
@@ -5506,6 +5543,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 4,\n"
 "                \"option-data\": [ ],\n"
@@ -5601,6 +5639,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -5711,6 +5750,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -5831,6 +5871,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -5928,6 +5969,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -6027,6 +6069,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -6122,6 +6165,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 123,\n"
 "                \"option-data\": [ ],\n"
@@ -6147,6 +6191,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 234,\n"
 "                \"option-data\": [ ],\n"
@@ -6218,6 +6263,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 542,\n"
 "                \"option-data\": [ ],\n"
@@ -6352,6 +6398,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 234,\n"
 "                \"option-data\": [ ],\n"
@@ -6598,6 +6645,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -6623,6 +6671,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 2,\n"
 "                \"option-data\": [ ],\n"
@@ -6648,6 +6697,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 3,\n"
 "                \"option-data\": [ ],\n"
@@ -6673,6 +6723,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 4,\n"
 "                \"option-data\": [ ],\n"
@@ -6698,6 +6749,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 5,\n"
 "                \"option-data\": [ ],\n"
@@ -6793,6 +6845,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -6818,6 +6871,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 2,\n"
 "                \"option-data\": [ ],\n"
@@ -7264,6 +7318,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -7359,6 +7414,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -7454,6 +7510,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -7550,6 +7607,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -7651,6 +7709,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -7752,6 +7811,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -7849,6 +7909,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -7947,6 +8008,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 1,\n"
 "                \"option-data\": [ ],\n"
@@ -8181,6 +8243,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [\n"
 "            {\n"
 "                \"comment\": \"A shared network\",\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"interface\": \"\",\n"
 "                \"name\": \"foo\",\n"
@@ -8194,6 +8257,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"subnet6\": [\n"
 "                    {\n"
 "                        \"comment\": \"A subnet\",\n"
+"                        \"allow-static-leases\": false,\n"
 "                        \"calculate-tee-times\": true,\n"
 "                        \"id\": 100,\n"
 "                        \"option-data\": [ ],\n"
@@ -8374,6 +8438,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [ ],\n"
 "        \"subnet6\": [\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 123,\n"
 "                \"option-data\": [ ],\n"
@@ -8399,6 +8464,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 234,\n"
 "                \"option-data\": [ ],\n"
@@ -8419,6 +8485,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"valid-lifetime\": 4000\n"
 "            },\n"
 "            {\n"
+"                \"allow-static-leases\": false,\n"
 "                \"calculate-tee-times\": true,\n"
 "                \"id\": 542,\n"
 "                \"option-data\": [ ],\n"
index 27562b2740f1c19cc78a5c1f1c8aaf0c838c054e..d3a3cd53a2693a17e1a6a2b2f1965435a230e11d 100644 (file)
@@ -242,6 +242,10 @@ Network::toElement() const {
         map->set("t2-percent", Element::create(t2_percent_));
     }
 
+    if (!allow_static_leases_.unspecified()) {
+        map->set("allow-static-leases", Element::create(allow_static_leases_));
+    }
+
     return (map);
 }
 
index 08d68b793fbc64bea45bd9784368eea5068192f3..02f9689139fc4d6b51482872ddd16db01d39ea06 100644 (file)
@@ -206,7 +206,8 @@ public:
     Network()
         : iface_name_(), client_class_(), t1_(), t2_(), valid_(),
           host_reservation_mode_(HR_ALL, true), cfg_option_(new CfgOption()),
-          calculate_tee_times_(), t1_percent_(), t2_percent_() {
+          calculate_tee_times_(), t1_percent_(), t2_percent_(),
+          allow_static_leases_() {
     }
 
     /// @brief Virtual destructor.
@@ -520,6 +521,24 @@ public:
         t2_percent_ = t2_percent;
     }
 
+    /// @brief Returns whether or not static leases are allowed.
+    ///
+    /// @param inheritance inheritance mode to be used.
+    util::Optional<bool>
+    getAllowStaticLeases(const Inheritance& inheritance = Inheritance::ALL) const {
+        return (getProperty<Network>(&Network::getAllowStaticLeases,
+                                     allow_static_leases_,
+                                     inheritance,
+                                     "allow-static-leases"));
+    }
+
+    /// @brief Sets whether or not static leases are allowed.
+    ///
+    /// @param allow_static_leases new value of allowed/forbidden.
+    void setAllowStaticLeases(const util::Optional<bool>& allow_static_leases) {
+        allow_static_leases_ = allow_static_leases;
+    }
+
     /// @brief Unparses network object.
     ///
     /// @return A pointer to unparsed network configuration.
@@ -782,6 +801,9 @@ protected:
     /// @brief Percentage of the lease lifetime to use when calculating T2 timer
     util::Optional<double> t2_percent_;
 
+    /// @brief Allows static leases
+    util::Optional<bool> allow_static_leases_;
+
     /// @brief Pointer to another network that this network belongs to.
     ///
     /// The most common case is that this instance is a subnet which belongs
index a9c20aa85e378ef7e048b89e8568fa51478f542b..b9b0ce086e5e7e896a0660279d6f15c2c540d91c 100644 (file)
@@ -925,6 +925,12 @@ Subnet4ConfigParser::initSubnet(data::ConstElementPtr params,
 
     // Parse t1-percent and t2-percent
     parseTeePercents(params, network);
+
+    // Parse allow-static-leases
+    if (params->contains("allow-static-leases")) {
+        bool allow_static_leases = getBoolean(params, "allow-static-leases");
+        subnet4->setAllowStaticLeases(allow_static_leases);
+    }
 }
 
 //**************************** Subnets4ListConfigParser **********************
@@ -1314,6 +1320,12 @@ Subnet6ConfigParser::initSubnet(data::ConstElementPtr params,
 
     // Parse t1-percent and t2-percent
     parseTeePercents(params, network);
+
+    // Parse allow-static-leases
+    if (params->contains("allow-static-leases")) {
+        bool allow_static_leases = getBoolean(params, "allow-static-leases");
+        subnet6->setAllowStaticLeases(allow_static_leases);
+    }
 }
 
 //**************************** Subnet6ListConfigParser ********************
index 4ec06d6381ae74f76ca6ba89190fe971568eea8a..ae4968e31b670f182127e792ad919edde56d7290 100644 (file)
@@ -174,6 +174,12 @@ SharedNetwork4Parser::parse(const data::ConstElementPtr& shared_network_data) {
 
         parseTeePercents(shared_network_data, network);
 
+        if (shared_network_data->contains("allow-static-leases")) {
+            bool allow_static_leases = getBoolean(shared_network_data,
+                                                  "allow-static-leases");
+            shared_network->setAllowStaticLeases(allow_static_leases);
+        }
+
     } catch (const DhcpConfigError&) {
         // Position was already added
         throw;
@@ -326,6 +332,12 @@ SharedNetwork6Parser::parse(const data::ConstElementPtr& shared_network_data) {
 
         parseTeePercents(shared_network_data, network);
 
+        if (shared_network_data->contains("allow-static-leases")) {
+            bool allow_static_leases = getBoolean(shared_network_data,
+                                                  "allow-static-leases");
+            shared_network->setAllowStaticLeases(allow_static_leases);
+        }
+
     } catch (const std::exception& ex) {
         isc_throw(DhcpConfigError, ex.what() << " ("
                   << shared_network_data->getPosition() << ")");
index 54b28e5af17ac5903649212cddee25fee894334d..d78239b0ec97f291ff527e40f6d56e8d67aa3c20 100644 (file)
@@ -198,6 +198,7 @@ TEST(CfgSharedNetworks4Test, unparse) {
     network1->setCalculateTeeTimes(true);
     network1->setT1Percent(.35);
     network1->setT2Percent(.655);
+    network1->setAllowStaticLeases(true);
 
     network2->setIface("eth1");
     network2->setT1(Triplet<uint32_t>(100));
@@ -242,7 +243,8 @@ TEST(CfgSharedNetworks4Test, unparse) {
         "    \"relay\": { \"ip-addresses\": [ \"198.16.1.1\", \"198.16.1.2\" ] },\n"
         "    \"subnet4\": [ ],\n"
         "    \"t1-percent\": .35,\n"
-        "    \"t2-percent\": .655\n"
+        "    \"t2-percent\": .655,\n"
+        "    \"allow-static-leases\": true\n"
         "  }\n"
         "]\n";
 
index 6d338083fc465a83798f9c1ce6b8b6c0975f17d7..e3f18931cc55c24adbfa83907353f9da9dfdcdc0 100644 (file)
@@ -200,6 +200,7 @@ TEST(CfgSharedNetworks6Test, unparse) {
     network1->setCalculateTeeTimes(true);
     network1->setT1Percent(.35);
     network1->setT2Percent(.655);
+    network1->setAllowStaticLeases(true);
 
     network2->setIface("eth1");
     network2->setT1(Triplet<uint32_t>(100));
@@ -250,7 +251,8 @@ TEST(CfgSharedNetworks6Test, unparse) {
         "    \"relay\": { \"ip-addresses\": [ \"2001:db8:1::1\", \"2001:db8:1::2\" ] },\n"
         "    \"subnet6\": [ ],\n"
         "    \"t1-percent\": .35,\n"
-        "    \"t2-percent\": .655\n"
+        "    \"t2-percent\": .655,\n"
+        "    \"allow-static-leases\": true\n"
         "  }\n"
         "]\n";
 
index e99c475e6a676b8f16edc2f1a223b752591706fe..6b36eb7029a97a27f0cf04a59712038e8ead4a74 100644 (file)
@@ -1027,6 +1027,7 @@ TEST(CfgSubnets4Test, unparseSubnet) {
     subnet3->setCalculateTeeTimes(true);
     subnet3->setT1Percent(0.50);
     subnet3->setT2Percent(0.65);
+    subnet3->setAllowStaticLeases(true);
     subnet3->setHostReservationMode(Network::HR_ALL);
     subnet3->setAuthoritative(false);
     subnet3->setMatchClientId(true);
@@ -1100,7 +1101,8 @@ TEST(CfgSubnets4Test, unparseSubnet) {
         "    \"require-client-classes\": [ \"foo\", \"bar\" ],\n"
         "    \"calculate-tee-times\": true,\n"
         "    \"t1-percent\": 0.50,\n"
-        "    \"t2-percent\": 0.65\n"
+        "    \"t2-percent\": 0.65,\n"
+        "    \"allow-static-leases\": true\n"
         "} ]\n";
     runToElementTest<CfgSubnets4>(expected, cfg);
 }
@@ -1364,6 +1366,7 @@ TEST(CfgSubnets4Test, validLifetimeValidation) {
         EXPECT_EQ("100", value->str());
         EXPECT_FALSE(repr->get("min-valid-lifetime"));
         EXPECT_FALSE(repr->get("max-valid-lifetime"));
+        EXPECT_FALSE(repr->get("allow-static-leases"));
     }
 
     {
@@ -1539,6 +1542,23 @@ TEST(CfgSubnets4Test, validLifetimeValidation) {
         EXPECT_EQ(oneyear, t2_value->intValue());
     }
 
+    {
+        SCOPED_TRACE("allow static leases");
+        data::ElementPtr copied = data::copy(elems);
+        copied->set("allow-static-leases", data::Element::create(true));
+        Subnet4Ptr subnet;
+        Subnet4ConfigParser parser;
+        ASSERT_NO_THROW(subnet = parser.parse(copied));
+        ASSERT_TRUE(subnet);
+        EXPECT_FALSE(subnet->getAllowStaticLeases().unspecified());
+        EXPECT_TRUE(subnet->getAllowStaticLeases());
+        data::ConstElementPtr repr = subnet->toElement();
+        data::ConstElementPtr value = repr->get("allow-static-leases");
+        ASSERT_TRUE(value);
+        ASSERT_EQ(data::Element::boolean, value->getType());
+        EXPECT_TRUE(value->boolValue());
+    }
+
     {
         SCOPED_TRACE("default value too small");
         data::ElementPtr copied = data::copy(elems);
index a84dc3bd63b4e1b843a6c3c214fe15f08ca93548..ec5b76464813a16e2e89587a187d4631f50792ae 100644 (file)
@@ -630,6 +630,7 @@ TEST(CfgSubnets6Test, unparseSubnet) {
     subnet3->setCalculateTeeTimes(true);
     subnet3->setT1Percent(0.50);
     subnet3->setT2Percent(0.65);
+    subnet3->setAllowStaticLeases(true);
     subnet3->setValid(Triplet<uint32_t>(100, 200, 300));
     subnet3->setPreferred(Triplet<uint32_t>(50, 100, 150));
 
@@ -694,7 +695,8 @@ TEST(CfgSubnets6Test, unparseSubnet) {
         "    \"require-client-classes\": [ \"foo\", \"bar\" ],\n"
         "    \"calculate-tee-times\": true,\n"
         "    \"t1-percent\": 0.50,\n"
-        "    \"t2-percent\": 0.65\n"
+        "    \"t2-percent\": 0.65,\n"
+        "    \"allow-static-leases\": true\n"
         "} ]\n";
     runToElementTest<CfgSubnets6>(expected, cfg);
 }
@@ -1152,6 +1154,7 @@ TEST(CfgSubnets6Test, preferredLifetimeValidation) {
         EXPECT_EQ("100", value->str());
         EXPECT_FALSE(repr->get("min-preferred-lifetime"));
         EXPECT_FALSE(repr->get("max-preferred-lifetime"));
+        EXPECT_FALSE(repr->get("allow-static-leases"));
     }
 
     {
@@ -1328,6 +1331,23 @@ TEST(CfgSubnets6Test, preferredLifetimeValidation) {
         EXPECT_EQ(oneyear, t2_value->intValue());
     }
 
+    {
+        SCOPED_TRACE("allow static leases");
+        data::ElementPtr copied = data::copy(elems);
+        copied->set("allow-static-leases", data::Element::create(true));
+        Subnet6Ptr subnet;
+        Subnet6ConfigParser parser;
+        ASSERT_NO_THROW(subnet = parser.parse(copied));
+        ASSERT_TRUE(subnet);
+        EXPECT_FALSE(subnet->getAllowStaticLeases().unspecified());
+        EXPECT_TRUE(subnet->getAllowStaticLeases());
+        data::ConstElementPtr repr = subnet->toElement();
+        data::ConstElementPtr value = repr->get("allow-static-leases");
+        ASSERT_TRUE(value);
+        ASSERT_EQ(data::Element::boolean, value->getType());
+        EXPECT_TRUE(value->boolValue());
+    }
+
     {
         SCOPED_TRACE("default value too small");
         data::ElementPtr copied = data::copy(elems);
index 4dc4da40cf37d4b144bf91ee9f864862c524770a..01e4905ac639404952c7770ec3d9a8e09322d8f6 100644 (file)
@@ -3121,6 +3121,9 @@ TEST_F(ParseConfigTest, defaultSubnet4) {
     EXPECT_TRUE(subnet->getT2Percent().unspecified());
     EXPECT_EQ(0.0, subnet->getT2Percent().get());
 
+    EXPECT_TRUE(subnet->getAllowStaticLeases().unspecified());
+    EXPECT_FALSE(subnet->getAllowStaticLeases().get());
+
     EXPECT_TRUE(subnet->getMatchClientId().unspecified());
     EXPECT_TRUE(subnet->getMatchClientId().get());
 
@@ -3192,6 +3195,9 @@ TEST_F(ParseConfigTest, defaultSubnet6) {
     EXPECT_TRUE(subnet->getT2Percent().unspecified());
     EXPECT_EQ(0.0, subnet->getT2Percent().get());
 
+    EXPECT_TRUE(subnet->getAllowStaticLeases().unspecified());
+    EXPECT_FALSE(subnet->getAllowStaticLeases().get());
+
     EXPECT_TRUE(subnet->getPreferred().unspecified());
     EXPECT_EQ(0, subnet->getPreferred().get());
 
@@ -3246,6 +3252,9 @@ TEST_F(ParseConfigTest, defaultSharedNetwork4) {
     EXPECT_TRUE(network->getT2Percent().unspecified());
     EXPECT_EQ(0.0, network->getT2Percent().get());
 
+    EXPECT_TRUE(network->getAllowStaticLeases().unspecified());
+    EXPECT_FALSE(network->getAllowStaticLeases().get());
+
     EXPECT_TRUE(network->getMatchClientId().unspecified());
     EXPECT_TRUE(network->getMatchClientId().get());
 
@@ -3300,6 +3309,9 @@ TEST_F(ParseConfigTest, defaultSharedNetwork6) {
     EXPECT_TRUE(network->getT2Percent().unspecified());
     EXPECT_EQ(0.0, network->getT2Percent().get());
 
+    EXPECT_TRUE(network->getAllowStaticLeases().unspecified());
+    EXPECT_FALSE(network->getAllowStaticLeases().get());
+
     EXPECT_TRUE(network->getPreferred().unspecified());
     EXPECT_EQ(0, network->getPreferred().get());
 
index ab74ea8af2aab5e974410d49d1f446c19a744ddc..7928f298cbc15e1487db7214881fbe5307e31130 100644 (file)
@@ -169,6 +169,7 @@ TEST_F(NetworkTest, inheritanceSupport4) {
     globals_->set("calculate-tee-times", Element::create(false));
     globals_->set("t1-percent", Element::create(0.75));
     globals_->set("t2-percent", Element::create(0.6));
+    globals_->set("allow-static-leases", Element::create(false));
     globals_->set("match-client-id", Element::create(true));
     globals_->set("authoritative", Element::create(false));
     globals_->set("next-server", Element::create("192.0.2.3"));
@@ -229,6 +230,12 @@ TEST_F(NetworkTest, inheritanceSupport4) {
                                             &Network::setT2Percent,
                                             0.3, 0.6);
     }
+    {
+        SCOPED_TRACE("allow-static-leases");
+        testNetworkInheritance<TestNetwork>(&Network::getAllowStaticLeases,
+                                            &Network::setAllowStaticLeases,
+                                            true, false);
+    }
     {
         SCOPED_TRACE("match-client-id");
         testNetworkInheritance<TestNetwork4>(&Network4::getMatchClientId,
index 9fdbdf61f54e5d3892d1baba82f25b5acf9b70b8..97fe2ccd3beb50c78598c37d0f4c9eb9ddcc6cea 100644 (file)
@@ -135,6 +135,7 @@ public:
                 "    \"calculate-tee-times\": true,"
                 "    \"t1-percent\": 0.345,"
                 "    \"t2-percent\": 0.721,"
+                "    \"allow-static-leases\": true,"
                 "    \"option-data\": ["
                 "        {"
                 "            \"name\": \"domain-name-servers\","
@@ -165,7 +166,8 @@ public:
                 "            \"reservation-mode\": \"all\","
                 "            \"calculate-tee-times\": true,"
                 "            \"t1-percent\": .45,"
-                "            \"t2-percent\": .65"
+                "            \"t2-percent\": .65,"
+                "            \"allow-static-leases\": true"
                 "        },"
                 "        {"
                 "            \"id\": 2,"
@@ -188,7 +190,8 @@ public:
                 "            \"reservation-mode\": \"all\","
                 "            \"calculate-tee-times\": false,"
                 "            \"t1-percent\": .40,"
-                "            \"t2-percent\": .80"
+                "            \"t2-percent\": .80,"
+                "            \"allow-static-leases\": false"
                 "        }"
                 "    ]"
                 "}";
@@ -242,6 +245,7 @@ TEST_F(SharedNetwork4ParserTest, parse) {
     EXPECT_TRUE(network->getCalculateTeeTimes());
     EXPECT_EQ(0.345, network->getT1Percent());
     EXPECT_EQ(0.721, network->getT2Percent());
+    EXPECT_TRUE(network->getAllowStaticLeases());
     EXPECT_EQ("/dev/null", network->getFilename().get());
     EXPECT_EQ("10.0.0.1", network->getSiaddr().get().toText());
     EXPECT_EQ("example.org", network->getSname().get());
@@ -445,6 +449,7 @@ public:
                 "    \"calculate-tee-times\": true,"
                 "    \"t1-percent\": 0.345,"
                 "    \"t2-percent\": 0.721,"
+                "    \"allow-static-leases\": true,"
                 "    \"option-data\": ["
                 "        {"
                 "            \"name\": \"dns-servers\","
@@ -537,6 +542,7 @@ TEST_F(SharedNetwork6ParserTest, parse) {
     EXPECT_TRUE(network->getCalculateTeeTimes());
     EXPECT_EQ(0.345, network->getT1Percent());
     EXPECT_EQ(0.721, network->getT2Percent());
+    EXPECT_TRUE(network->getAllowStaticLeases());
 
     // Relay information.
     auto relay_info = network->getRelayInfo();
index 75e44215f3e7f5821d8f69e497016a1ab29aec55..5e71725d09908f0fa98776d7839573f7ccab9fe8 100644 (file)
@@ -61,6 +61,9 @@ TEST(SharedNetwork4Test, defaults) {
     EXPECT_TRUE(network->getT2Percent().unspecified());
     EXPECT_EQ(0.0, network->getT2Percent().get());
 
+    EXPECT_TRUE(network->getAllowStaticLeases().unspecified());
+    EXPECT_FALSE(network->getAllowStaticLeases().get());
+
     EXPECT_TRUE(network->getMatchClientId().unspecified());
     EXPECT_TRUE(network->getMatchClientId().get());
 
@@ -674,6 +677,9 @@ TEST(SharedNetwork6Test, defaults) {
     EXPECT_TRUE(network->getT2Percent().unspecified());
     EXPECT_EQ(0.0, network->getT2Percent().get());
 
+    EXPECT_TRUE(network->getAllowStaticLeases().unspecified());
+    EXPECT_FALSE(network->getAllowStaticLeases().get());
+
     EXPECT_TRUE(network->getPreferred().unspecified());
     EXPECT_EQ(0, network->getPreferred().get());
 
index 3201e71ea017b1dabdd3ea61f244b3903f3fbdeb..f3fbb564ddbe8df190675db96968200019c44a82 100644 (file)
@@ -92,6 +92,9 @@ TEST(Subnet4Test, defaults) {
     EXPECT_TRUE(subnet.getT2Percent().unspecified());
     EXPECT_EQ(0.0, subnet.getT2Percent().get());
 
+    EXPECT_TRUE(subnet.getAllowStaticLeases().unspecified());
+    EXPECT_FALSE(subnet.getAllowStaticLeases().get());
+
     EXPECT_TRUE(subnet.getMatchClientId().unspecified());
     EXPECT_TRUE(subnet.getMatchClientId().get());
 
@@ -814,6 +817,9 @@ TEST(SharedNetwork6Test, defaults) {
     EXPECT_TRUE(subnet.getT2Percent().unspecified());
     EXPECT_EQ(0.0, subnet.getT2Percent().get());
 
+    EXPECT_TRUE(subnet.getAllowStaticLeases().unspecified());
+    EXPECT_FALSE(subnet.getAllowStaticLeases().get());
+
     EXPECT_TRUE(subnet.getPreferred().unspecified());
     EXPECT_EQ(0, subnet.getPreferred().get());