diff --git a/doc/examples/kea4/all-keys.json b/doc/examples/kea4/all-keys.json index 327a6e5059..99d3d6ab8c 100644 --- a/doc/examples/kea4/all-keys.json +++ b/doc/examples/kea4/all-keys.json @@ -706,7 +706,7 @@ "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. @@ -880,7 +880,7 @@ "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, @@ -1019,7 +1019,7 @@ "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, diff --git a/doc/examples/kea6/all-keys.json b/doc/examples/kea6/all-keys.json index b683e80106..8f191a4bdc 100644 --- a/doc/examples/kea6/all-keys.json +++ b/doc/examples/kea6/all-keys.json @@ -664,7 +664,7 @@ "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. @@ -861,7 +861,7 @@ "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, @@ -997,7 +997,7 @@ "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", diff --git a/doc/sphinx/arm/dhcp4-srv.rst b/doc/sphinx/arm/dhcp4-srv.rst index 4bf6bd1c98..d4a6456dc6 100644 --- a/doc/sphinx/arm/dhcp4-srv.rst +++ b/doc/sphinx/arm/dhcp4-srv.rst @@ -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, ... } diff --git a/doc/sphinx/arm/dhcp6-srv.rst b/doc/sphinx/arm/dhcp6-srv.rst index c5f7f3db5e..5c277fa612 100644 --- a/doc/sphinx/arm/dhcp6-srv.rst +++ b/doc/sphinx/arm/dhcp6-srv.rst @@ -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, ... } diff --git a/doc/sphinx/arm/hooks.rst b/doc/sphinx/arm/hooks.rst index c2130c4a6b..95fceffe81 100644 --- a/doc/sphinx/arm/hooks.rst +++ b/doc/sphinx/arm/hooks.rst @@ -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", diff --git a/src/bin/dhcp4/json_config_parser.cc b/src/bin/dhcp4/json_config_parser.cc index 4f1a844ce4..199b06c301 100644 --- a/src/bin/dhcp4/json_config_parser.cc +++ b/src/bin/dhcp4/json_config_parser.cc @@ -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)); diff --git a/src/bin/dhcp4/tests/config_parser_unittest.cc b/src/bin/dhcp4/tests/config_parser_unittest.cc index 18d6525630..546b47635d 100644 --- a/src/bin/dhcp4/tests/config_parser_unittest.cc +++ b/src/bin/dhcp4/tests/config_parser_unittest.cc @@ -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" " }," " {" diff --git a/src/bin/dhcp4/tests/host_unittest.cc b/src/bin/dhcp4/tests/host_unittest.cc index 42273631f3..49085ddd7f 100644 --- a/src/bin/dhcp4/tests/host_unittest.cc +++ b/src/bin/dhcp4/tests/host_unittest.cc @@ -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" diff --git a/src/bin/dhcp6/json_config_parser.cc b/src/bin/dhcp6/json_config_parser.cc index b5979dbe4e..6af3c0c3ca 100644 --- a/src/bin/dhcp6/json_config_parser.cc +++ b/src/bin/dhcp6/json_config_parser.cc @@ -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)); diff --git a/src/bin/dhcp6/tests/config_parser_unittest.cc b/src/bin/dhcp6/tests/config_parser_unittest.cc index d6daab6208..4b51fe7abc 100644 --- a/src/bin/dhcp6/tests/config_parser_unittest.cc +++ b/src/bin/dhcp6/tests/config_parser_unittest.cc @@ -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" " }," " {" diff --git a/src/lib/dhcpsrv/network.cc b/src/lib/dhcpsrv/network.cc index 51e5784f3b..26e27e3c35 100644 --- a/src/lib/dhcpsrv/network.cc +++ b/src/lib/dhcpsrv/network.cc @@ -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)); } } } diff --git a/src/lib/dhcpsrv/network.h b/src/lib/dhcpsrv/network.h index 2bc9ec8f34..4c9e34ed41 100644 --- a/src/lib/dhcpsrv/network.h +++ b/src/lib/dhcpsrv/network.h @@ -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; + static const uint8_t HR_DISABLED; // value: 0 - /// 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; + /// 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-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; + /// 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; + /// 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. - static const uint8_t HR_ALL; + /// 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; } diff --git a/src/lib/dhcpsrv/parsers/base_network_parser.cc b/src/lib/dhcpsrv/parsers/base_network_parser.cc index c4954a5954..6370239a59 100644 --- a/src/lib/dhcpsrv/parsers/base_network_parser.cc +++ b/src/lib/dhcpsrv/parsers/base_network_parser.cc @@ -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")) { diff --git a/src/lib/dhcpsrv/parsers/reservation_modes_parser.cc b/src/lib/dhcpsrv/parsers/reservation_modes_parser.cc index 36c3aa532d..fcde1bbfa6 100644 --- a/src/lib/dhcpsrv/parsers/reservation_modes_parser.cc +++ b/src/lib/dhcpsrv/parsers/reservation_modes_parser.cc @@ -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) { diff --git a/src/lib/dhcpsrv/parsers/simple_parser4.cc b/src/lib/dhcpsrv/parsers/simple_parser4.cc index dfd3345c3c..87944e74d9 100644 --- a/src/lib/dhcpsrv/parsers/simple_parser4.cc +++ b/src/lib/dhcpsrv/parsers/simple_parser4.cc @@ -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" }, diff --git a/src/lib/dhcpsrv/parsers/simple_parser6.cc b/src/lib/dhcpsrv/parsers/simple_parser6.cc index 7a75b1bc19..a8ccdad620 100644 --- a/src/lib/dhcpsrv/parsers/simple_parser6.cc +++ b/src/lib/dhcpsrv/parsers/simple_parser6.cc @@ -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" }, diff --git a/src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc b/src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc index 4eb5b55884..fafdc7230d 100644 --- a/src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc +++ b/src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc @@ -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" diff --git a/src/lib/dhcpsrv/tests/cfg_subnets6_unittest.cc b/src/lib/dhcpsrv/tests/cfg_subnets6_unittest.cc index e1c98d4c7b..ce57ebe1dd 100644 --- a/src/lib/dhcpsrv/tests/cfg_subnets6_unittest.cc +++ b/src/lib/dhcpsrv/tests/cfg_subnets6_unittest.cc @@ -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; diff --git a/src/lib/dhcpsrv/tests/shared_network_parser_unittest.cc b/src/lib/dhcpsrv/tests/shared_network_parser_unittest.cc index ad01f34fe2..ae3c2f66f8 100644 --- a/src/lib/dhcpsrv/tests/shared_network_parser_unittest.cc +++ b/src/lib/dhcpsrv/tests/shared_network_parser_unittest.cc @@ -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" " }" " ]" diff --git a/src/lib/dhcpsrv/tests/shared_network_unittest.cc b/src/lib/dhcpsrv/tests/shared_network_unittest.cc index 4b1e8cd3d6..c7b09e0769 100644 --- a/src/lib/dhcpsrv/tests/shared_network_unittest.cc +++ b/src/lib/dhcpsrv/tests/shared_network_unittest.cc @@ -18,7 +18,6 @@ #include #include #include - 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"