]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3911] fixed error handling
authorRazvan Becheriu <razvan@isc.org>
Thu, 12 Jun 2025 18:32:05 +0000 (21:32 +0300)
committerRazvan Becheriu <razvan@isc.org>
Thu, 12 Jun 2025 19:08:39 +0000 (22:08 +0300)
ChangeLog
src/bin/dhcp4/tests/classify_unittest.cc
src/bin/dhcp6/tests/classify_unittest.cc
src/lib/dhcpsrv/alloc_engine.cc

index 89204b3bfd2c66fe5bc6623910ded1317feb611a..12ee964495c33816ad6b277ab5b02c0800484659 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2352.  [bug]           razvan
+       Fix error handling when detecting a global reservation for the
+       client and global reservatons are explicitly disabled in the
+       configuration.
+       (Gitlab #3911)
+
+2351.  [doc]           razvan
+       Updated documentation and examples related to 4over6 port.
+       (Gitlab #3851)
+
 2350.  [doc]           razvan
        Updated documentation and examples related to HTTP/HTTPS socket
        ports used by kea-ctrl-agent, kea-dhcp4, kea-dhcp6, kea-dhcp-ddns
index edf0e8f82929e29cabf335f771532648f0cef326..29f5f97363db535e7332f3330f1ca38e295b07ea 100644 (file)
@@ -115,7 +115,7 @@ namespace {
 ///   - 2 subnets: 10.0.0.0/24 guarded by first and 10.0.1.0/24
 ///   - 2 pools: 10.0.0.10-10.0.0.100 and 10.0.1.10-10.0.1.100
 ///   - 1 global reservation for HW address 'aa:bb:cc:dd:ee:ff'
-///     setting the first class
+///     with IP address outside the pool, setting the first class
 ///   - the following class defined: first
 ///
 /// - Configuration 9:
@@ -415,6 +415,7 @@ const char* CONFIGS[] = {
         "}],"
         "\"reservations\": [ {"
         "    \"hw-address\": \"aa:bb:cc:dd:ee:ff\","
+        "    \"ip-address\": \"10.0.1.200\","
         "    \"client-classes\": [ \"first\" ] } ]"
     "}",
 
index a3652f977f87ef95777b695a0e54ee9f45401da3..d448ae7d008757718dfe6ef6fa0d060343b58ed7 100644 (file)
@@ -101,7 +101,8 @@ namespace {
 ///   - Used for the early global reservations lookup / select subnet.
 ///   - 2 subnets: 2001:db8:1::/48 (guarded) and 2001:db8:2::/48
 ///   - 2 pools: 2001:db8:1:1::/64 and 2001:db8:2:1::/64
-///   - 1 global reservation setting the first class
+///   - 1 global reservation with IP address outside the pool, setting
+///     the first class
 ///   - the following class defined: first
 ///
 /// - Configuration 7:
@@ -419,6 +420,7 @@ const char* CONFIGS[] = {
     "\"reservations\": ["
     "{"
     "    \"duid\": \"01:02:03:04\","
+    "    \"ip-addresses\": [ \"2001:db8:1:cafe::1\" ],"
     "    \"client-classes\": [ \"first\" ]"
     "}"
     "],"
index 5c1f8e4b4006819a287103e3c7389ac3ec40f63a..92d456d7943de9b286dbc9f02fa3e94b449ffbbd 100644 (file)
@@ -3507,7 +3507,7 @@ hasAddressReservation(AllocEngine::ClientContext4& ctx) {
         LOG_DEBUG(alloc_engine_logger, ALLOC_ENGINE_DBG_TRACE,
                   ALLOC_ENGINE_IGNORING_UNSUITABLE_GLOBAL_ADDRESS)
             .arg(ctx.query_->getLabel())
-            .arg(ctx.currentHost()->getIPv4Reservation().toText())
+            .arg(global_host_address.toText())
             .arg(AllocEngine::labelNetworkOrSubnet(ctx.subnet_));
     }