summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotrek Zadroga <piotrek@isc.org>2024-04-24 20:06:32 +0200
committerPiotrek Zadroga <piotrek@isc.org>2024-04-26 14:42:46 +0200
commite681090bd3925467720972fc27b0bc32b3211004 (patch)
tree4417d63054657c1600aaaee2ce0c8bb72a56840f
parent[#2820] add tid in all eval logs (diff)
downloadkea-e681090bd3925467720972fc27b0bc32b3211004.tar.xz
kea-e681090bd3925467720972fc27b0bc32b3211004.zip
[#2820] add tid in some leases logs
-rw-r--r--src/bin/dhcp4/dhcp4_messages.cc2
-rw-r--r--src/bin/dhcp4/dhcp4_messages.mes2
-rw-r--r--src/bin/dhcp4/dhcp4_srv.cc1
3 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/dhcp4/dhcp4_messages.cc b/src/bin/dhcp4/dhcp4_messages.cc
index 647e103294..2135c1886c 100644
--- a/src/bin/dhcp4/dhcp4_messages.cc
+++ b/src/bin/dhcp4/dhcp4_messages.cc
@@ -353,7 +353,7 @@ const char* values[] = {
"DHCP4_RESPONSE_HOSTNAME_DATA", "%1: including Hostname option in the server's response: %2",
"DHCP4_RESPONSE_HOSTNAME_GENERATE", "%1: server has generated hostname %2 for the client",
"DHCP4_SERVER_FAILED", "server failed: %1",
- "DHCP4_SERVER_INITIATED_DECLINE", "Lease for addr %1 has been found to be already in use. The lease will be unavailable for %2 seconds.",
+ "DHCP4_SERVER_INITIATED_DECLINE", "%1: Lease for addr %2 has been found to be already in use. The lease will be unavailable for %3 seconds.",
"DHCP4_SERVER_INITIATED_DECLINE_ADD_FAILED", "%1: error adding a lease for address %2",
"DHCP4_SERVER_INITIATED_DECLINE_FAILED", "%1: error on server-initiated decline lease for address %2: %3",
"DHCP4_SERVER_INITIATED_DECLINE_RESOURCE_BUSY", "%1: error declining a lease for address %2",
diff --git a/src/bin/dhcp4/dhcp4_messages.mes b/src/bin/dhcp4/dhcp4_messages.mes
index c3e5d624f3..2ee2c43cc1 100644
--- a/src/bin/dhcp4/dhcp4_messages.mes
+++ b/src/bin/dhcp4/dhcp4_messages.mes
@@ -988,7 +988,7 @@ generated hostname.
The DHCPv4 server has encountered a fatal error and is terminating.
The reason for the failure is included in the message.
-% DHCP4_SERVER_INITIATED_DECLINE Lease for addr %1 has been found to be already in use. The lease will be unavailable for %2 seconds.
+% DHCP4_SERVER_INITIATED_DECLINE %1: Lease for addr %2 has been found to be already in use. The lease will be unavailable for %3 seconds.
This informational message is printed when the server has detected via
ICMP ECHO (i.e. ping check) or other means that a lease which should be
free to offer is actually in use. This message may indicate a misconfiguration
diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc
index d7df95d8af..f189aee01f 100644
--- a/src/bin/dhcp4/dhcp4_srv.cc
+++ b/src/bin/dhcp4/dhcp4_srv.cc
@@ -4129,6 +4129,7 @@ void
Dhcpv4Srv::serverDecline(hooks::CalloutHandlePtr& callout_handle, Pkt4Ptr& query,
Lease4Ptr lease, bool lease_exists) {
LOG_INFO(lease4_logger, DHCP4_SERVER_INITIATED_DECLINE)
+ .arg(query->getLabel())
.arg(lease->addr_.toText())
.arg(lease->valid_lft_);