]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2918] added message for requested address on DHCPREQUEST
authorRazvan Becheriu <razvan@isc.org>
Wed, 4 Oct 2023 11:18:23 +0000 (14:18 +0300)
committerRazvan Becheriu <razvan@isc.org>
Fri, 6 Oct 2023 13:06:34 +0000 (16:06 +0300)
src/bin/dhcp4/dhcp4_messages.cc
src/bin/dhcp4/dhcp4_messages.h
src/bin/dhcp4/dhcp4_messages.mes
src/bin/dhcp4/dhcp4_srv.cc

index 8765442cbe03d0249ca49c869160ae7d92275c44..da47f7221a5bd831d7cd82ccada1f0fcd0824364 100644 (file)
@@ -154,6 +154,7 @@ extern const isc::log::MessageID DHCP4_RELEASE_EXPIRED = "DHCP4_RELEASE_EXPIRED"
 extern const isc::log::MessageID DHCP4_RELEASE_FAIL = "DHCP4_RELEASE_FAIL";
 extern const isc::log::MessageID DHCP4_RELEASE_FAIL_NO_LEASE = "DHCP4_RELEASE_FAIL_NO_LEASE";
 extern const isc::log::MessageID DHCP4_RELEASE_FAIL_WRONG_CLIENT = "DHCP4_RELEASE_FAIL_WRONG_CLIENT";
+extern const isc::log::MessageID DHCP4_REQUEST = "DHCP4_REQUEST";
 extern const isc::log::MessageID DHCP4_RESERVATIONS_LOOKUP_FIRST_ENABLED = "DHCP4_RESERVATIONS_LOOKUP_FIRST_ENABLED";
 extern const isc::log::MessageID DHCP4_RESERVED_HOSTNAME_ASSIGNED = "DHCP4_RESERVED_HOSTNAME_ASSIGNED";
 extern const isc::log::MessageID DHCP4_RESPONSE_DATA = "DHCP4_RESPONSE_DATA";
@@ -331,6 +332,7 @@ const char* values[] = {
     "DHCP4_RELEASE_FAIL", "%1: failed to remove lease for address %2",
     "DHCP4_RELEASE_FAIL_NO_LEASE", "%1: client is trying to release non-existing lease %2",
     "DHCP4_RELEASE_FAIL_WRONG_CLIENT", "%1: client is trying to release the lease %2 which belongs to a different client",
+    "DHCP4_REQUEST", "%1: server is processing DHCPREQUEST with hint=%2",
     "DHCP4_RESERVATIONS_LOOKUP_FIRST_ENABLED", "Multi-threading is enabled and host reservations lookup is always performed first.",
     "DHCP4_RESERVED_HOSTNAME_ASSIGNED", "%1: server assigned reserved hostname %2",
     "DHCP4_RESPONSE_DATA", "%1: responding with packet %2 (type %3), packet details: %4",
index 45b69867b3aa1e19d54498ee2bb8754ffb6e68ab..f60dbbc68cca41d902bd2138160357db65902fa6 100644 (file)
@@ -155,6 +155,7 @@ extern const isc::log::MessageID DHCP4_RELEASE_EXPIRED;
 extern const isc::log::MessageID DHCP4_RELEASE_FAIL;
 extern const isc::log::MessageID DHCP4_RELEASE_FAIL_NO_LEASE;
 extern const isc::log::MessageID DHCP4_RELEASE_FAIL_WRONG_CLIENT;
+extern const isc::log::MessageID DHCP4_REQUEST;
 extern const isc::log::MessageID DHCP4_RESERVATIONS_LOOKUP_FIRST_ENABLED;
 extern const isc::log::MessageID DHCP4_RESERVED_HOSTNAME_ASSIGNED;
 extern const isc::log::MessageID DHCP4_RESPONSE_DATA;
index 8dea2733a2c4abce65578cd2ce89df61cdff712a..4858415cf659b8340362b488e0eed8abf5e89124 100644 (file)
@@ -551,6 +551,14 @@ about the address that the client would like to have allocated.
 If there is no hint, the argument should provide the text indicating
 that the hint hasn't been sent.
 
+% DHCP4_REQUEST %1: server is processing DHCPREQUEST with hint=%2
+This is a debug message that indicates the processing of a received DHCPREQUEST
+message. The first argument contains the client and the transaction
+identification information. The second argument may hold the hint for the server
+about the address that the client would like to have allocated.
+If there is no hint, the argument should provide the text indicating
+that the hint hasn't been sent.
+
 % DHCP4_LEASE_ALLOC %1: lease %2 has been allocated for %3 seconds
 This informational message indicates that the server successfully granted a
 lease in response to client's DHCPREQUEST message. The lease information will
index bc24f72d7a3ada6dd2c6e20011874d7009d0aa5f..e2a4cc1a59cd58a8c5016debd8a81100a3dfcab7 100644 (file)
@@ -2668,6 +2668,10 @@ Dhcpv4Srv::assignLease(Dhcpv4Exchange& ex) {
         LOG_DEBUG(lease4_logger, DBG_DHCP4_DETAIL, DHCP4_DISCOVER)
             .arg(query->getLabel())
             .arg(hint != IOAddress::IPV4_ZERO_ADDRESS() ? hint.toText() : "(no hint)");
+    } else {
+        LOG_DEBUG(lease4_logger, DBG_DHCP4_DETAIL, DHCP4_REQUEST)
+            .arg(query->getLabel())
+            .arg(hint != IOAddress::IPV4_ZERO_ADDRESS() ? hint.toText() : "(no hint)");
     }
 
     // If there is no subnet configuration for that client we ignore the