2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 05:27:55 +00:00

[#1254] Addressed review comments

This commit is contained in:
Thomas Markwalder 2020-08-14 10:37:27 -04:00 committed by Razvan Becheriu
parent bd33d3bbdb
commit f41bac10f4
6 changed files with 10 additions and 11 deletions

View File

@ -1,8 +1,8 @@
17xx. [bug]* fdupont
When a host reservation in a subnet reserves an address, the
address must in the subnet prefix. This check was previously
address must be within the subnet. This check was previously
only done by the host command hook library. Note it does not
applies the prefix delegation.
apply to prefix delegation.
(Gitlab #1254)
1787. [bug] razvan

View File

@ -3843,8 +3843,7 @@ DHCPv4 message such as siaddr, sname, or file.
.. note::
Beginning with Kea 1.7.11 the reserved address must be in the subnet
prefix.
Beginning with Kea 1.7.11 the reserved address must be within the subnet.
The following example shows how to reserve addresses for specific hosts
in a subnet:

View File

@ -3356,8 +3356,8 @@ specify a hostname and DHCPv6 options for a given host.
.. note::
Beginning with Kea 1.7.11 all reserved addresses must be in the subnet
prefix. This does not apply to reserved prefixes.
Beginning with Kea 1.7.11 all reserved addresses must be within the subnet.
This does not apply to reserved prefixes.
The following example shows how to reserve addresses and prefixes for
specific hosts:

View File

@ -936,7 +936,7 @@ Subnet4ConfigParser::validateResv(const Subnet4Ptr& subnet, ConstHostPtr host) {
const IOAddress& address = host->getIPv4Reservation();
if (!address.isV4Zero() && !subnet->inRange(address)) {
isc_throw(DhcpConfigError, "specified reservation '" << address
<< "' is not matching the IPv4 subnet prefix '"
<< "' is not within the IPv4 subnet '"
<< subnet->toText() << "'");
}
}
@ -1346,7 +1346,7 @@ Subnet6ConfigParser::validateResvs(const Subnet6Ptr& subnet, ConstHostPtr host)
const IOAddress& address = it->second.getPrefix();
if (!subnet->inRange(address)) {
isc_throw(DhcpConfigError, "specified reservation '" << address
<< "' is not matching the IPv6 subnet prefix '"
<< "' is not within the IPv6 subnet '"
<< subnet->toText() << "'");
}
}

View File

@ -1953,8 +1953,8 @@ TEST(CfgSubnets4Test, outOfRangeHost) {
<< "invalid JSON:" << json << "\n test is broken";
Subnet4ConfigParser parser;
std::string msg = "specified reservation '10.2.2.1' is not matching ";
msg += "the IPv4 subnet prefix '10.1.2.0/24'";
std::string msg = "specified reservation '10.2.2.1' is not within ";
msg += "the IPv4 subnet '10.1.2.0/24'";
EXPECT_THROW_MSG(parser.parse(elems), DhcpConfigError, msg);
}

View File

@ -1830,7 +1830,7 @@ TEST(CfgSubnets6Test, outOfRangeHost) {
Subnet6ConfigParser parser;
std::string msg = "specified reservation '2001:db8:2::1' is ";
msg += "not matching the IPv6 subnet prefix '2001:db8:1::/48'";
msg += "not within the IPv6 subnet '2001:db8:1::/48'";
EXPECT_THROW_MSG(parser.parse(elems), DhcpConfigError, msg);
}