]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2865] Add hwaddr to pkt4 prints
authorPiotrek Zadroga <piotrek@isc.org>
Fri, 2 Jun 2023 16:12:37 +0000 (18:12 +0200)
committerPiotrek Zadroga <piotrek@isc.org>
Wed, 7 Jun 2023 08:40:21 +0000 (08:40 +0000)
src/bin/dhcp4/dhcp4_messages.cc
src/bin/dhcp4/dhcp4_messages.mes
src/bin/dhcp4/dhcp4_srv.cc

index df8984622e676cfcd6a0764c08353da502d32264..e0c1e8c8b3261769eb27216bffe26cee72985bbb 100644 (file)
@@ -284,11 +284,11 @@ const char* values[] = {
     "DHCP4_PACKET_DROP_0007", "%1: failed to process packet: %2",
     "DHCP4_PACKET_DROP_0008", "%1: DHCP service is globally disabled",
     "DHCP4_PACKET_DROP_0009", "%1: Option 53 missing (no DHCP message type), is this a BOOTP packet?",
-    "DHCP4_PACKET_DROP_0010", "dropped as member of the special class 'DROP': %1",
+    "DHCP4_PACKET_DROP_0010", "dropped as member of the special class 'DROP': %1 hwaddr=%2",
     "DHCP4_PACKET_DROP_0011", "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",
     "DHCP4_PACKET_DROP_0012", "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",
-    "DHCP4_PACKET_DROP_0013", "dropped as member of the special class 'DROP' after host reservation lookup: %1",
-    "DHCP4_PACKET_DROP_0014", "dropped as member of the special class 'DROP' after early global host reservations lookup: %1",
+    "DHCP4_PACKET_DROP_0013", "dropped as member of the special class 'DROP' after host reservation lookup: %1 hwaddr=%2",
+    "DHCP4_PACKET_DROP_0014", "dropped as member of the special class 'DROP' after early global host reservations lookup: %1 hwaddr=%2",
     "DHCP4_PACKET_NAK_0001", "%1: failed to select a subnet for incoming packet, src %2, type %3",
     "DHCP4_PACKET_NAK_0002", "%1: invalid address %2 requested by INIT-REBOOT",
     "DHCP4_PACKET_NAK_0003", "%1: failed to advertise a lease, client sent ciaddr %2, requested-ip-address %3",
index 36515bfd8495f50dcd17f680efd1870ae82cc212..7bd7bc8e2dddab623815e885050c8afa1baa1552 100644 (file)
@@ -637,7 +637,7 @@ This debug message is issued when a packet is dropped because it did contain
 option 53 and thus has no DHCP message type. The most likely explanation is
 that it was BOOTP packet.
 
-% DHCP4_PACKET_DROP_0010 dropped as member of the special class 'DROP': %1
+% DHCP4_PACKET_DROP_0010 dropped as member of the special class 'DROP': %1 hwaddr=%2
 This debug message is emitted when an incoming packet was classified
 into the special class 'DROP' and dropped. The packet details are displayed.
 
@@ -655,12 +655,12 @@ processing is finished.
 Packet details and thread identifiers are included for both packets in
 this warning message.
 
-% DHCP4_PACKET_DROP_0013 dropped as member of the special class 'DROP' after host reservation lookup: %1
+% DHCP4_PACKET_DROP_0013 dropped as member of the special class 'DROP' after host reservation lookup: %1 hwaddr=%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.
 
-% DHCP4_PACKET_DROP_0014 dropped as member of the special class 'DROP' after early global host reservations lookup: %1
+% DHCP4_PACKET_DROP_0014 dropped as member of the special class 'DROP' after early global host reservations lookup: %1 hwaddr=%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 0b30e75c96df4ba1f75b98bab506a0e0d278ed3d..cd64d9a54158216cd1bcf95d1d428d2a8f8fcf07 100644 (file)
@@ -262,7 +262,7 @@ Dhcpv4Exchange::Dhcpv4Exchange(const AllocEnginePtr& alloc_engine,
     // Check the DROP special class.
     if (query_->inClass("DROP")) {
         LOG_DEBUG(packet4_logger, DBGLVL_PKT_HANDLING, DHCP4_PACKET_DROP_0013)
-            .arg(query_->toText());
+            .arg(query_->toText()).arg(query_->getHWAddr()->toText());;
         isc::stats::StatsMgr::instance().addValue("pkt4-receive-drop",
                                                   static_cast<int64_t>(1));
         drop = true;
@@ -983,7 +983,7 @@ Dhcpv4Srv::earlyGHRLookup(const Pkt4Ptr& query,
             if (query->inClass("DROP")) {
                 LOG_DEBUG(packet4_logger, DBGLVL_PKT_HANDLING,
                           DHCP4_PACKET_DROP_0014)
-                    .arg(query->toText());
+                    .arg(query->toText()).arg(query->getHWAddr()->toText());;
                 isc::stats::StatsMgr::instance().addValue("pkt4-receive-drop",
                                                           static_cast<int64_t>(1));
                 return (false);
@@ -1299,7 +1299,7 @@ Dhcpv4Srv::processPacket(Pkt4Ptr& query, Pkt4Ptr& rsp, bool allow_packet_park) {
     // Check the DROP special class.
     if (query->inClass("DROP")) {
         LOG_DEBUG(packet4_logger, DBGLVL_PKT_HANDLING, DHCP4_PACKET_DROP_0010)
-            .arg(query->toText());
+            .arg(query->toText()).arg(query->getHWAddr()->toText());
         isc::stats::StatsMgr::instance().addValue("pkt4-receive-drop",
                                                   static_cast<int64_t>(1));
         return;