]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2865] Add DUID in some pkt6 prints
authorPiotrek Zadroga <piotrek@isc.org>
Tue, 6 Jun 2023 09:27:09 +0000 (11:27 +0200)
committerPiotrek Zadroga <piotrek@isc.org>
Wed, 7 Jun 2023 08:40:21 +0000 (08:40 +0000)
src/bin/dhcp6/dhcp6_messages.cc
src/bin/dhcp6/dhcp6_messages.mes
src/bin/dhcp6/dhcp6_srv.cc

index 24d60ee944e220ecde0ae81f5979dd2f62120365..2445b44c7d1a4cc2106328963fcd4a6ecacaded0 100644 (file)
@@ -269,9 +269,9 @@ const char* values[] = {
     "DHCP6_OPEN_SOCKETS_NO_RECONNECT_CTL", "unexpected error in bind service sockets.",
     "DHCP6_OPEN_SOCKET_FAIL", "failed to open socket: %1",
     "DHCP6_PACKET_DROP_DHCP_DISABLED", "%1: DHCP service is globally disabled",
-    "DHCP6_PACKET_DROP_DROP_CLASS", "dropped as member of the special class 'DROP': %1",
-    "DHCP6_PACKET_DROP_DROP_CLASS2", "dropped as member of the special class 'DROP' after host reservation lookup: %1",
-    "DHCP6_PACKET_DROP_DROP_CLASS_EARLY", "dropped as member of the special class 'DROP' after early global host reservations lookup: %1",
+    "DHCP6_PACKET_DROP_DROP_CLASS", "dropped as member of the special class 'DROP': %1 %2",
+    "DHCP6_PACKET_DROP_DROP_CLASS2", "dropped as member of the special class 'DROP' after host reservation lookup: %1 %2",
+    "DHCP6_PACKET_DROP_DROP_CLASS_EARLY", "dropped as member of the special class 'DROP' after early global host reservations lookup: %1 %2",
     "DHCP6_PACKET_DROP_DUPLICATE", "dropped as sent by the same client than a packet being processed by another thread: dropped %1 by thread %2 as duplicate of %3 processed by %4",
     "DHCP6_PACKET_DROP_PARSE_FAIL", "failed to parse packet from %1 to %2, received over interface %3, reason: %4",
     "DHCP6_PACKET_DROP_SERVERID_MISMATCH", "%1: dropping packet with server identifier: %2, server is using: %3",
index e714375ee8b2231fd295e969660072f187c83295..ace9aeecc4aab44440a0afc283da0319faa3edf0 100644 (file)
@@ -579,16 +579,16 @@ has been temporarily disabled. This affects all received DHCP packets. The
 service may be enabled by the "dhcp-enable" control command or automatically
 after a specified amount of time since receiving "dhcp-disable" command.
 
-% DHCP6_PACKET_DROP_DROP_CLASS dropped as member of the special class 'DROP': %1
+% DHCP6_PACKET_DROP_DROP_CLASS dropped as member of the special class 'DROP': %1 %2
 This debug message is emitted when an incoming packet was classified
 into the special class 'DROP' and dropped. The packet details are displayed.
 
-% DHCP6_PACKET_DROP_DROP_CLASS2 dropped as member of the special class 'DROP' after host reservation lookup: %1
+% DHCP6_PACKET_DROP_DROP_CLASS2 dropped as member of the special class 'DROP' after host reservation lookup: %1 %2
 This debug message is emitted when an incoming packet was classified
 after host reservation lookup into the special class 'DROP' and dropped.
 The packet details are displayed.
 
-% DHCP6_PACKET_DROP_DROP_CLASS_EARLY dropped as member of the special class 'DROP' after early global host reservations lookup: %1
+% DHCP6_PACKET_DROP_DROP_CLASS_EARLY dropped as member of the special class 'DROP' after early global host reservations lookup: %1 %2
 This debug message is emitted when an incoming packet was classified
 after early global host reservations lookup into the special class 'DROP'
 and dropped. The packet details are displayed.
index 8b389448f3fc6b7013317497b618c545f53b7c55..8eaa5c9e92d9b9dd81791bb4deb7dd87be427d4e 100644 (file)
@@ -478,6 +478,7 @@ Dhcpv6Srv::earlyGHRLookup(const Pkt6Ptr& query,
             if (query->inClass("DROP")) {
                 LOG_DEBUG(packet6_logger, DBGLVL_PKT_HANDLING,
                           DHCP6_PACKET_DROP_DROP_CLASS_EARLY)
+                    .arg(query->makeLabel(query->getClientId(), nullptr))
                     .arg(query->toText());
                 StatsMgr::instance().addValue("pkt6-receive-drop",
                                               static_cast<int64_t>(1));
@@ -581,6 +582,7 @@ Dhcpv6Srv::initContext(const Pkt6Ptr& pkt,
     // Check the DROP special class.
     if (pkt->inClass("DROP")) {
         LOG_DEBUG(packet6_logger, DBGLVL_PKT_HANDLING, DHCP6_PACKET_DROP_DROP_CLASS2)
+            .arg(pkt->makeLabel(pkt->getClientId(), nullptr))
             .arg(pkt->toText());
         StatsMgr::instance().addValue("pkt6-receive-drop",
                                       static_cast<int64_t>(1));
@@ -896,6 +898,7 @@ Dhcpv6Srv::processPacket(Pkt6Ptr& query, Pkt6Ptr& rsp) {
     // Check the DROP special class.
     if (query->inClass("DROP")) {
         LOG_DEBUG(packet6_logger, DBGLVL_PKT_HANDLING, DHCP6_PACKET_DROP_DROP_CLASS)
+            .arg(query->makeLabel(query->getClientId(), nullptr))
             .arg(query->toText());
         StatsMgr::instance().addValue("pkt6-receive-drop",
                                       static_cast<int64_t>(1));