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:
parent
bd33d3bbdb
commit
f41bac10f4
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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() << "'");
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user