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
.. 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:
.. 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:
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() << "'");
}
}
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() << "'");
}
}
<< "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);
}
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);
}