]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1254] Addressed review comments
authorThomas Markwalder <tmark@isc.org>
Fri, 14 Aug 2020 14:37:27 +0000 (10:37 -0400)
committerRazvan Becheriu <razvan@isc.org>
Fri, 14 Aug 2020 14:43:56 +0000 (17:43 +0300)
ChangeLog
doc/sphinx/arm/dhcp4-srv.rst
doc/sphinx/arm/dhcp6-srv.rst
src/lib/dhcpsrv/parsers/dhcp_parsers.cc
src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc
src/lib/dhcpsrv/tests/cfg_subnets6_unittest.cc

index 0df15559ff247eff3dbe5a66075289cc41602600..6b5eb4a1c5562fec089c6de434e2304e07ae9226 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 65eab79b7710c993ab9f268f52e875459c2a7e23..6c508950629c9119f0fce05ff016743239ca05bd 100644 (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:
index 86a5b1fe85ef9da2b58df09e540b51afaf02fffa..59556fec1acc7cd6b6c66aec5bb9a6680c3b8618 100644 (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:
index 83277c0c2aa8456b9466cfa22c53ffdafc7e769b..4987b35030621dc05fde333ffa842aebe4d30733 100644 (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() << "'");
         }
     }
index 75b0ba2c2835c0ceae4906ab854f2343e6cda88a..57afe98c1de2f214f9567e3c5cece53042175006 100644 (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);
 }
 
index d32d8555d83b1b882d46627f813810462f7f8f8a..4bf52c5a5c4830f4ea2c232fe0edb42329f06d9e 100644 (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);
 }