]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1405] in-subnet is equivalent to all
authorRazvan Becheriu <razvan@isc.org>
Tue, 27 Oct 2020 17:49:22 +0000 (19:49 +0200)
committerRazvan Becheriu <razvan@isc.org>
Wed, 18 Nov 2020 13:55:23 +0000 (15:55 +0200)
20 files changed:
doc/examples/kea4/all-keys.json
doc/examples/kea6/all-keys.json
doc/sphinx/arm/dhcp4-srv.rst
doc/sphinx/arm/dhcp6-srv.rst
doc/sphinx/arm/hooks.rst
src/bin/dhcp4/json_config_parser.cc
src/bin/dhcp4/tests/config_parser_unittest.cc
src/bin/dhcp4/tests/host_unittest.cc
src/bin/dhcp6/json_config_parser.cc
src/bin/dhcp6/tests/config_parser_unittest.cc
src/lib/dhcpsrv/network.cc
src/lib/dhcpsrv/network.h
src/lib/dhcpsrv/parsers/base_network_parser.cc
src/lib/dhcpsrv/parsers/reservation_modes_parser.cc
src/lib/dhcpsrv/parsers/simple_parser4.cc
src/lib/dhcpsrv/parsers/simple_parser6.cc
src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc
src/lib/dhcpsrv/tests/cfg_subnets6_unittest.cc
src/lib/dhcpsrv/tests/shared_network_parser_unittest.cc
src/lib/dhcpsrv/tests/shared_network_unittest.cc

index 327a6e50599a69918b5553d6d0ffb08e60762031..99d3d6ab8c1a6516f6c7852e641acd5d747e63f0 100644 (file)
                 "reservations-in-subnet": true,
 
                 // Specify if server should lookup out-of-pool reservations.
-                "reservations-out-of-pool": true,
+                "reservations-out-of-pool": false,
 
                 // List of client classes which must be evaluated when this shared
                 // network is selected for client assignments.
                         "reservations-in-subnet": true,
 
                         // Specify if server should lookup out-of-pool reservations.
-                        "reservations-out-of-pool": true,
+                        "reservations-out-of-pool": false,
 
                         // Subnet level compute T1 and T2 timers.
                         "calculate-tee-times": true,
         "reservations-in-subnet": true,
 
         // Specify if server should lookup out-of-pool reservations.
-        "reservations-out-of-pool": true,
+        "reservations-out-of-pool": false,
 
         // Global compute T1 and T2 timers.
         "calculate-tee-times": true,
index b683e80106c47b361a34425f4bffdd809bc14721..8f191a4bdc084f5d708837375823cfe1bef4d209 100644 (file)
                 "reservations-in-subnet": true,
 
                 // Specify if server should lookup out-of-pool reservations.
-                "reservations-out-of-pool": true,
+                "reservations-out-of-pool": false,
 
                 // List of client classes which must be evaluated when this shared
                 // network is selected for client assignments.
                         "reservations-in-subnet": true,
 
                         // Specify if server should lookup out-of-pool reservations.
-                        "reservations-out-of-pool": true,
+                        "reservations-out-of-pool": false,
 
                         // Subnet level compute T1 and T2 timers.
                         "calculate-tee-times": true,
         "reservations-in-subnet": true,
 
         // Specify if server should lookup out-of-pool reservations.
-        "reservations-out-of-pool": true,
+        "reservations-out-of-pool": false,
 
         // Data directory.
         "data-directory": "/tmp",
index 4bf6bd1c98ffc8a4852d790f0eb7f2565ed9b2bb..d4a6456dc6a9d718fd5afba6aef5e93b1b8debd1 100644 (file)
@@ -4661,7 +4661,7 @@ The correspondence of old values are:
    "Dhcp4": {
 
        "reservations-global": false,
-       "reservations-in-subnet": false,
+       "reservations-in-subnet": true,
        "reservations-out-of-pool": true,
        ...
    }
@@ -4674,7 +4674,7 @@ The correspondence of old values are:
 
        "reservations-global": false,
        "reservations-in-subnet": true,
-       "reservations-out-of-pool": true,
+       "reservations-out-of-pool": false,
        ...
    }
 
@@ -4686,7 +4686,7 @@ To activate both ``global`` and ``all``, the following combination can be used:
 
        "reservations-global": true,
        "reservations-in-subnet": true,
-       "reservations-out-of-pool": true,
+       "reservations-out-of-pool": false,
        ...
    }
 
index c5f7f3db5e04a7f54163b931a433979ba8d9c23d..5c277fa612139715f3f432e988986dd456d2047b 100644 (file)
@@ -4106,7 +4106,7 @@ The correspondence of old values are:
    "Dhcp6": {
 
        "reservations-global": false,
-       "reservations-in-subnet": false,
+       "reservations-in-subnet": true,
        "reservations-out-of-pool": true,
        ...
    }
@@ -4119,7 +4119,7 @@ The correspondence of old values are:
 
        "reservations-global": false,
        "reservations-in-subnet": true,
-       "reservations-out-of-pool": true,
+       "reservations-out-of-pool": false,
        ...
    }
 
@@ -4131,7 +4131,7 @@ To activate both ``global`` and ``all``, the following combination can be used:
 
        "reservations-global": true,
        "reservations-in-subnet": true,
-       "reservations-out-of-pool": true,
+       "reservations-out-of-pool": false,
        ...
    }
 
index c2130c4a6b454d70d83561f670ed390b1a324317..95fceffe81ba71ee55134846b83eea0f43bf4a87 100644 (file)
@@ -2663,7 +2663,7 @@ An example response could look as follows:
                # Specify if server should lookup in-subnet reservations.
                "reservations-in-subnet": true,
                # Specify if server should lookup out-of-pool reservations.
-               "reservations-out-of-pool": true,
+               "reservations-out-of-pool": false,
                "subnet4": [
                    {
                        "subnet": "192.0.2.0/24",
index 4f1a844ce4b38be395b5d83a4f6dd881f63fb2cc..199b06c301e00f0fb770db67740034b3f840705a 100644 (file)
@@ -369,15 +369,9 @@ configureDhcp4Server(Dhcpv4Srv& server, isc::data::ConstElementPtr config_set,
 
         bool found = false;
         ConstElementPtr reservations_out_of_pool = mutable_cfg->get("reservations-out-of-pool");
-        if (reservations_out_of_pool) {
-            found = true;
-        }
         ConstElementPtr reservations_in_subnet = mutable_cfg->get("reservations-in-subnet");
-        if (reservations_in_subnet) {
-            found = true;
-        }
         ConstElementPtr reservations_global = mutable_cfg->get("reservations-global");
-        if (reservations_global) {
+        if (reservations_out_of_pool || reservations_in_subnet || reservations_global) {
             found = true;
         }
         ConstElementPtr reservation_mode = mutable_cfg->get("reservation-mode");
@@ -393,11 +387,21 @@ configureDhcp4Server(Dhcpv4Srv& server, isc::data::ConstElementPtr config_set,
 
         // reset all other reservation flags to overwrite default values.
         if (found) {
+            bool force_true = false;
             if (!reservations_out_of_pool) {
                 mutable_cfg->set("reservations-out-of-pool", Element::create(false));
+            } else {
+                force_true = reservations_out_of_pool->boolValue();
             }
             if (!reservations_in_subnet) {
-                mutable_cfg->set("reservations-in-subnet", Element::create(false));
+                if (force_true) {
+                    mutable_cfg->set("reservations-in-subnet", Element::create(true));
+                } else {
+                    mutable_cfg->set("reservations-in-subnet", Element::create(false));
+                }
+            } else if (force_true && !reservations_in_subnet->boolValue()) {
+                isc_throw(DhcpConfigError, "invalid use of disabled 'reservations-in-subnet'"
+                                           " when enabled 'reservations-out-of-pool'");
             }
             if (!reservations_global) {
                 mutable_cfg->set("reservations-global", Element::create(false));
index 18d6525630a68a4bd760ffeab9ca31fe294c8506..546b47635dcea0a6c68278f461473fb64a3038b2 100644 (file)
@@ -5386,7 +5386,6 @@ TEST_F(Dhcp4ParserTest, hostReservationModesPerSubnet) {
         "\"subnet4\": [ { "
         "    \"pools\": [ { \"pool\": \"192.0.1.0/24\" } ],"
         "    \"subnet\": \"192.0.1.0/24\", "
-        "    \"reservations-out-of-pool\": true,"
         "    \"reservations-in-subnet\": true"
         " },"
         " {"
@@ -5413,7 +5412,7 @@ TEST_F(Dhcp4ParserTest, hostReservationModesPerSubnet) {
         " {"
         "    \"pools\": [ { \"pool\": \"192.0.6.0/24\" } ],"
         "    \"subnet\": \"192.0.6.0/24\", "
-        "    \"reservations-out-of-pool\": true,"
+        "    \"reservations-out-of-pool\": false,"
         "    \"reservations-in-subnet\": true,"
         "    \"reservations-global\": true"
         " } ],"
@@ -5547,7 +5546,6 @@ TEST_F(Dhcp4ParserTest, hostReservationModesGlobal) {
         "\"subnet4\": [ { "
         "    \"pools\": [ { \"pool\": \"192.0.2.0/24\" } ],"
         "    \"subnet\": \"192.0.2.0/24\", "
-        "    \"reservations-out-of-pool\": true,"
         "    \"reservations-in-subnet\": true"
         " },"
         " {"
index 42273631f3bb434bffc492228e9273660abcea9c..49085ddd7f5c7d6ac2b62ef8c18d7f6affe2d63e 100644 (file)
@@ -157,7 +157,6 @@ const char* CONFIGS[] = {
         "        \"id\": 10,"
         "        \"pools\": [ { \"pool\": \"10.0.0.10-10.0.0.100\" } ],\n"
         "        \"interface\": \"eth0\",\n"
-        "        \"reservations-out-of-pool\": true,\n"
         "        \"reservations-in-subnet\": true,\n"
         "        \"reservations\": [ \n"
         "        {\n"
index b5979dbe4ea1954355d248fd1b0d2995adc86895..6af3c0c3ca3feb8b8aa204a6e4402e769497a825 100644 (file)
@@ -470,15 +470,9 @@ configureDhcp6Server(Dhcpv6Srv& server, isc::data::ConstElementPtr config_set,
 
         bool found = false;
         ConstElementPtr reservations_out_of_pool = mutable_cfg->get("reservations-out-of-pool");
-        if (reservations_out_of_pool) {
-            found = true;
-        }
         ConstElementPtr reservations_in_subnet = mutable_cfg->get("reservations-in-subnet");
-        if (reservations_in_subnet) {
-            found = true;
-        }
         ConstElementPtr reservations_global = mutable_cfg->get("reservations-global");
-        if (reservations_global) {
+        if (reservations_out_of_pool || reservations_in_subnet || reservations_global) {
             found = true;
         }
         ConstElementPtr reservation_mode = mutable_cfg->get("reservation-mode");
@@ -494,11 +488,21 @@ configureDhcp6Server(Dhcpv6Srv& server, isc::data::ConstElementPtr config_set,
 
         // reset all other reservation flags to overwrite default values.
         if (found) {
+            bool force_true = false;
             if (!reservations_out_of_pool) {
                 mutable_cfg->set("reservations-out-of-pool", Element::create(false));
+            } else {
+                force_true = reservations_out_of_pool->boolValue();
             }
             if (!reservations_in_subnet) {
-                mutable_cfg->set("reservations-in-subnet", Element::create(false));
+                if (force_true) {
+                    mutable_cfg->set("reservations-in-subnet", Element::create(true));
+                } else {
+                    mutable_cfg->set("reservations-in-subnet", Element::create(false));
+                }
+            } else if (force_true && !reservations_in_subnet->boolValue()) {
+                isc_throw(DhcpConfigError, "invalid use of disabled 'reservations-in-subnet'"
+                                           " when enabled 'reservations-out-of-pool'");
             }
             if (!reservations_global) {
                 mutable_cfg->set("reservations-global", Element::create(false));
index d6daab62088a2e6f33b03f3d2fe3fb81a2862453..4b51fe7abcd415dd184e3fcea8bf5d8bea263b3f 100644 (file)
@@ -5750,7 +5750,7 @@ TEST_F(Dhcp6ParserTest, hostReservationModesPerSubnet) {
     ///       - 2001:db8:3::/64 (reservations disabled)
     ///       - 2001:db8:4::/64 (global reservations)
     ///       - 2001:db8:5::/64 (reservations not specified)
-    ///       - 2001:db8:5::/64 (global + all enabled)
+    ///       - 2001:db8:6::/64 (global + all enabled)
     const char* hr_config =
         "{"
         "\"preferred-lifetime\": 3000,"
@@ -5759,7 +5759,6 @@ TEST_F(Dhcp6ParserTest, hostReservationModesPerSubnet) {
         "\"subnet6\": [ { "
         "    \"pools\": [ { \"pool\": \"2001:db8:1::/64\" } ],"
         "    \"subnet\": \"2001:db8:1::/48\", "
-        "    \"reservations-out-of-pool\": true,"
         "    \"reservations-in-subnet\": true"
         " },"
         " {"
@@ -5786,7 +5785,7 @@ TEST_F(Dhcp6ParserTest, hostReservationModesPerSubnet) {
         " {"
         "    \"pools\": [ { \"pool\": \"2001:db8:6::/64\" } ],"
         "    \"subnet\": \"2001:db8:6::/48\", "
-        "    \"reservations-out-of-pool\": true,"
+        "    \"reservations-out-of-pool\": false,"
         "    \"reservations-in-subnet\": true,"
         "    \"reservations-global\": true"
         " } ],"
@@ -5918,7 +5917,6 @@ TEST_F(Dhcp6ParserTest, hostReservationModesGlobal) {
         "\"subnet6\": [ { "
         "    \"pools\": [ { \"pool\": \"2001:db8:1::/64\" } ],"
         "    \"subnet\": \"2001:db8:1::/48\", "
-        "    \"reservations-out-of-pool\": true,"
         "    \"reservations-in-subnet\": true"
         " },"
         " {"
index 51e5784f3bf68b75f345cf302657d4264d6e9f09..26e27e3c3572e05ad7e6613e61193b9442458eae 100644 (file)
@@ -23,7 +23,7 @@ const uint8_t Network::HR_DISABLED = 0;
 const uint8_t Network::HR_OUT_OF_POOL = 1 << 0;
 const uint8_t Network::HR_IN_SUBNET = 1 << 1;
 const uint8_t Network::HR_GLOBAL = 1 << 2;
-const uint8_t Network::HR_ALL = Network::HR_IN_SUBNET | Network::HR_OUT_OF_POOL;
+const uint8_t Network::HR_ALL = Network::HR_IN_SUBNET;
 
 void
 Network::RelayInfo::addAddress(const asiolink::IOAddress& addr) {
@@ -235,6 +235,7 @@ Network::toElement() const {
             }
             if (hr_out_of_pool) {
                 map->set("reservations-out-of-pool", Element::create(true));
+                map->set("reservations-in-subnet", Element::create(true));
             }
         }
     }
index 2bc9ec8f347733991500514d65b8a691b329c516..4c9e34ed411b3635cc9bc6d294b40bbc126fc827 100644 (file)
@@ -152,33 +152,34 @@ public:
         IOAddressList addresses_;
     };
 
-
     /// @brief Specifies allowed host reservation mode.
     ///
     /// None - host reservation is disabled. No reservation types
     /// are allowed.
-    static const uint8_t HR_DISABLED;
-
-    /// Only out-of-pool reservations is allowed. This mode
-    /// allows AllocEngine to skip reservation checks when
-    /// dealing with with addresses that are in pool.
-    /// When HR_IN_SUBNET is set, this is always enabled as well.
-    static const uint8_t HR_OUT_OF_POOL;
-
-    /// The in-pool reservations is allowed. This mode actually
-    /// behaves as if out-of-pool reservations are active as well.
-    static const uint8_t HR_IN_SUBNET;
-
-    /// Only global reservations are allowed. This mode
-    /// instructs AllocEngine to only look at global reservations.
-    static const uint8_t HR_GLOBAL;
-
-    /// Both out-of-pool and in-pool reservations are allowed. This is the
-    /// most flexible mode, where sysadmin have biggest liberty. However,
-    /// there is a non-trivial performance penalty for it, as the
-    /// AllocEngine code has to check whether there are reservations, even
-    /// when dealing with reservations from within the dynamic pools.
-    static const uint8_t HR_ALL;
+    static const uint8_t HR_DISABLED; // value: 0
+
+    /// Only out-of-pool reservations is allowed. This mode allows AllocEngine
+    /// to skip reservation checks for dynamically allocated addressed.
+    /// When this is set, HR_IN_SUBNET is always enabled as well as there can
+    /// can be no reservations that are out-of-pool but not in-subnet.
+    static const uint8_t HR_OUT_OF_POOL; // value: 1 << 0
+
+    /// The in-subnet mode which also allows in-pool reservations.
+    /// This is equivalent to HR_ALL flag.
+    static const uint8_t HR_IN_SUBNET; // value: 1 << 1
+
+    /// Only global reservations are allowed. This mode instructs AllocEngine
+    /// to only look at global reservations.
+    static const uint8_t HR_GLOBAL; // value: 1 << 2
+
+    /// Both out-of-pool and in-pool reservations are allowed. This is the most
+    /// flexible mode, where sysadmin have biggest liberty. However, there is a
+    /// non-trivial performance penalty for it, as the AllocEngine code has to
+    /// check whether there are reservations, even when dealing with
+    /// reservations from within the dynamic pools. This is required so that the
+    /// dynamically allocated addresses don't match any of the reservations.
+    /// This is the default mode.
+    static const uint8_t HR_ALL; // value: HR_IN_SUBNET
 
     /// @brief Bitset used to store @ref HRModeFlag flags.
     typedef uint8_t HRMode;
@@ -405,8 +406,8 @@ public:
     ///
     /// Host reservations may be any of the combinations of in-subnet (they
     /// reserve an address that is in the subnet either in-pool or out-of-pool),
-    /// out-of-pool (they reserve an address that is not in the dynamic pool) or
-    /// global (they are defined at global level). HR may also be completely
+    /// out-of-pool (they reserve an address that is in-subnet but not in-pool)
+    /// or global (they are defined at global level). HR may also be completely
     /// disabled for performance reasons.
     ///
     /// @param inheritance inheritance mode to be used.
@@ -468,7 +469,7 @@ public:
                                                         "reservations-out-of-pool");
                 if (!hr_mode_out_of_pool.unspecified()) {
                     if (hr_mode_out_of_pool.get()) {
-                        flags |= Network::HR_OUT_OF_POOL;
+                        flags |= Network::HR_IN_SUBNET | Network::HR_OUT_OF_POOL;
                     }
                     found = true;
                 }
index c4954a59549e6bb546c07ab4be0270f16152c275..6370239a59653d981b0adc0e5fdf9620eb5ce13a 100644 (file)
@@ -203,13 +203,9 @@ BaseNetworkParser::parseHostReservationMode(const data::ConstElementPtr& network
                                             NetworkPtr& network) {
     if (network_data->contains("reservation-mode")) {
         bool found = false;
-        if (network_data->contains("reservations-out-of-pool")) {
-            found = true;
-        }
-        if (network_data->contains("reservations-in-subnet")) {
-            found = true;
-        }
-        if (network_data->contains("reservations-global")) {
+        if (network_data->contains("reservations-out-of-pool") ||
+            network_data->contains("reservations-in-subnet") ||
+            network_data->contains("reservations-global")) {
             found = true;
         }
         if (found) {
@@ -233,13 +229,9 @@ void
 BaseNetworkParser::parseHostReservationModes(const data::ConstElementPtr& network_data,
                                              NetworkPtr& network) {
     bool found = false;
-    if (network_data->contains("reservations-out-of-pool")) {
-        found = true;
-    }
-    if (network_data->contains("reservations-in-subnet")) {
-        found = true;
-    }
-    if (network_data->contains("reservations-global")) {
+    if (network_data->contains("reservations-out-of-pool") ||
+        network_data->contains("reservations-in-subnet") ||
+        network_data->contains("reservations-global")) {
         found = true;
     }
     if (network_data->contains("reservation-mode")) {
index 36c3aa532d764c6240e857bb006bb232c37fd297..fcde1bbfa683a5cbe982806252583f56f98956dc 100644 (file)
@@ -49,7 +49,7 @@ HostReservationModesParser::parse(const ConstElementPtr& config_elem) {
         if (elem) {
             bool value = elem->boolValue();
             if (value) {
-                flags |= Network::HR_OUT_OF_POOL;
+                flags |= Network::HR_IN_SUBNET | Network::HR_OUT_OF_POOL;
             }
         }
     } catch (const Exception& ex) {
index dfd3345c3c2dba40af384cd5897ee846c8619d2c..87944e74d981117d588d134388d07f38d3b49da5 100644 (file)
@@ -113,7 +113,7 @@ const SimpleDefaults SimpleParser4::GLOBAL4_DEFAULTS = {
     { "server-hostname",                Element::string,  "" },
     { "boot-file-name",                 Element::string,  "" },
     { "server-tag",                     Element::string,  "" },
-    { "reservations-out-of-pool",       Element::boolean, "true" },
+    { "reservations-out-of-pool",       Element::boolean, "false" },
     { "reservations-in-subnet",         Element::boolean, "true" },
     { "reservations-global",            Element::boolean, "false" },
     { "calculate-tee-times",            Element::boolean, "false" },
index 7a75b1bc19c51fd680c95defc1fc74cfddd98dc5..a8ccdad620a59cddfdc1ecb8a85dbcf93f08359e 100644 (file)
@@ -109,7 +109,7 @@ const SimpleDefaults SimpleParser6::GLOBAL6_DEFAULTS = {
     { "decline-probation-period",       Element::integer, "86400" }, // 24h
     { "dhcp4o6-port",                   Element::integer, "0" },
     { "server-tag",                     Element::string,  "" },
-    { "reservations-out-of-pool",       Element::boolean, "true" },
+    { "reservations-out-of-pool",       Element::boolean, "false" },
     { "reservations-in-subnet",         Element::boolean, "true" },
     { "reservations-global",            Element::boolean, "false" },
     { "calculate-tee-times",            Element::boolean, "true" },
index 4eb5b55884f7e82bd42d3673c8787fcb37ac55bd..fafdc7230d86f0eb288c2e9350fb6f71419f0e89 100644 (file)
@@ -1116,7 +1116,6 @@ TEST(CfgSubnets4Test, unparseSubnet) {
         "    \"4o6-subnet\": \"\",\n"
         "    \"authoritative\": false,\n"
         "    \"reservations-in-subnet\": true,\n"
-        "    \"reservations-out-of-pool\": true,\n"
         "    \"option-data\": [ ],\n"
         "    \"pools\": [ ]\n,"
         "    \"require-client-classes\": [ \"foo\", \"bar\" ],\n"
@@ -1284,7 +1283,6 @@ TEST(CfgSubnets4Test, teeTimePercentValidation) {
         "            \"client-class\": \"\", \n"
         "            \"require-client-classes\": [] \n,"
         "            \"reservations-in-subnet\": true,\n"
-        "            \"reservations-out-of-pool\": true,\n"
         "            \"4o6-interface\": \"\", \n"
         "            \"4o6-interface-id\": \"\", \n"
         "            \"4o6-subnet\": \"\" \n"
@@ -1352,7 +1350,6 @@ TEST(CfgSubnets4Test, validLifetimeValidation) {
         "            \"client-class\": \"\", \n"
         "            \"require-client-classes\": [] \n,"
         "            \"reservations-in-subnet\": true,\n"
-        "            \"reservations-out-of-pool\": true,\n"
         "            \"4o6-interface\": \"\", \n"
         "            \"4o6-interface-id\": \"\", \n"
         "            \"4o6-subnet\": \"\" \n"
@@ -1595,7 +1592,6 @@ TEST(CfgSubnets4Test, hostnameSanitizierValidation) {
         "            \"client-class\": \"\", \n"
         "            \"require-client-classes\": [] \n,"
         "            \"reservations-in-subnet\": true,\n"
-        "            \"reservations-out-of-pool\": true,\n"
         "            \"4o6-interface\": \"\", \n"
         "            \"4o6-interface-id\": \"\", \n"
         "            \"4o6-subnet\": \"\" \n"
@@ -1674,7 +1670,6 @@ TEST(CfgSubnets4Test, cacheParamValidation) {
         "            \"client-class\": \"\", \n"
         "            \"require-client-classes\": [] \n,"
         "            \"reservations-in-subnet\": true,\n"
-        "            \"reservations-out-of-pool\": true,\n"
         "            \"4o6-interface\": \"\", \n"
         "            \"4o6-interface-id\": \"\", \n"
         "            \"4o6-subnet\": \"\" \n"
index e1c98d4c7b67309462c11c8f78d7fb3ba6bb8faf..ce57ebe1ddd904a9b31b8f0fddeec512c166dbff 100644 (file)
@@ -711,7 +711,6 @@ TEST(CfgSubnets6Test, unparseSubnet) {
         "    \"max-valid-lifetime\": 300,\n"
         "    \"rapid-commit\": false,\n"
         "    \"reservations-in-subnet\": true,\n"
-        "    \"reservations-out-of-pool\": true,\n"
         "    \"pools\": [ ],\n"
         "    \"pd-pools\": [ ],\n"
         "    \"option-data\": [ ],\n"
@@ -1080,8 +1079,7 @@ TEST(CfgSubnets6Test, teeTimePercentValidation) {
         "            \"valid-lifetime\": 300, \n"
         "            \"client-class\": \"\", \n"
         "            \"require-client-classes\": [] \n,"
-        "            \"reservations-in-subnet\": true,\n"
-        "            \"reservations-out-of-pool\": true\n"
+        "            \"reservations-in-subnet\": true\n"
         "        }";
 
 
@@ -1144,8 +1142,7 @@ TEST(CfgSubnets6Test, preferredLifetimeValidation) {
         "            \"valid-lifetime\": 300, \n"
         "            \"client-class\": \"\", \n"
         "            \"require-client-classes\": [] \n,"
-        "            \"reservations-in-subnet\": true,\n"
-        "            \"reservations-out-of-pool\": true\n"
+        "            \"reservations-in-subnet\": true\n"
         "        }";
 
 
@@ -1380,8 +1377,7 @@ TEST(CfgSubnets6Test, hostnameSanitizierValidation) {
         "            \"valid-lifetime\": 300, \n"
         "            \"client-class\": \"\", \n"
         "            \"require-client-classes\": [] \n,"
-        "            \"reservations-in-subnet\": true,\n"
-        "            \"reservations-out-of-pool\": true\n"
+        "            \"reservations-in-subnet\": true\n"
         "        }";
 
     data::ElementPtr elems;
@@ -1451,8 +1447,7 @@ TEST(CfgSubnets6Test, cacheParamValidation) {
         "            \"valid-lifetime\": 300, \n"
         "            \"client-class\": \"\", \n"
         "            \"require-client-classes\": [] \n,"
-        "            \"reservations-in-subnet\": true,\n"
-        "            \"reservations-out-of-pool\": true\n"
+        "            \"reservations-in-subnet\": true\n"
         "        }";
 
     data::ElementPtr elems;
index ad01f34fe26874a4351a28b6c08a3e2d27e1a168..ae3c2f66f83fe87579251a6afaf0d68613e79a3e 100644 (file)
@@ -174,7 +174,6 @@ public:
                 "            \"client-class\": \"\","
                 "            \"require-client-classes\": []\n,"
                 "            \"reservations-in-subnet\": true,"
-                "            \"reservations-out-of-pool\": true,"
                 "            \"4o6-interface\": \"\","
                 "            \"4o6-interface-id\": \"\","
                 "            \"4o6-subnet\": \"\","
@@ -200,7 +199,6 @@ public:
                 "            \"client-class\": \"\","
                 "            \"require-client-classes\": []\n,"
                 "            \"reservations-in-subnet\": true,"
-                "            \"reservations-out-of-pool\": true,"
                 "            \"4o6-interface\": \"\","
                 "            \"4o6-interface-id\": \"\","
                 "            \"4o6-subnet\": \"\","
@@ -592,7 +590,6 @@ public:
                 "            \"client-class\": \"\","
                 "            \"require-client-classes\": []\n,"
                 "            \"reservations-in-subnet\": true,"
-                "            \"reservations-out-of-pool\": true,"
                 "            \"rapid-commit\": false,"
                 "            \"hostname-char-set\": \"\""
                 "        },"
@@ -608,7 +605,6 @@ public:
                 "            \"client-class\": \"\","
                 "            \"require-client-classes\": []\n,"
                 "            \"reservations-in-subnet\": true,"
-                "            \"reservations-out-of-pool\": true,"
                 "            \"rapid-commit\": false"
                 "        }"
                 "    ]"
index 4b1e8cd3d6002df020af6d365fdce85c878c8f26..c7b09e076940fee44337afbebd1ea1b967221508 100644 (file)
@@ -18,7 +18,6 @@
 #include <gtest/gtest.h>
 #include <cstdint>
 #include <vector>
-
 using namespace isc;
 using namespace isc::asiolink;
 using namespace isc::dhcp;
@@ -641,7 +640,6 @@ TEST(SharedNetwork4Test, unparse) {
         "    \"renew-timer\": 100,\n"
         "    \"require-client-classes\": [ \"foo\" ],\n"
         "    \"reservations-in-subnet\": true,\n"
-        "    \"reservations-out-of-pool\": true,\n"
         "    \"subnet4\": [\n"
         "      {\n"
         "        \"4o6-interface\": \"\",\n"
@@ -1333,7 +1331,6 @@ TEST(SharedNetwork6Test, unparse) {
         "    \"renew-timer\": 100,\n"
         "    \"require-client-classes\": [ \"foo\" ],\n"
         "    \"reservations-in-subnet\": true,\n"
-        "    \"reservations-out-of-pool\": true,\n"
         "    \"subnet6\": [\n"
         "      {\n"
         "        \"id\": 1,\n"