From: Piotrek Zadroga Date: Tue, 6 Jun 2023 09:27:09 +0000 (+0200) Subject: [#2865] Add DUID in some pkt6 prints X-Git-Tag: Kea-2.4.0~205 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af5e29e1f11453be1beb38a41311b234e78fc362;p=thirdparty%2Fkea.git [#2865] Add DUID in some pkt6 prints --- diff --git a/src/bin/dhcp6/dhcp6_messages.cc b/src/bin/dhcp6/dhcp6_messages.cc index 24d60ee944..2445b44c7d 100644 --- a/src/bin/dhcp6/dhcp6_messages.cc +++ b/src/bin/dhcp6/dhcp6_messages.cc @@ -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", diff --git a/src/bin/dhcp6/dhcp6_messages.mes b/src/bin/dhcp6/dhcp6_messages.mes index e714375ee8..ace9aeecc4 100644 --- a/src/bin/dhcp6/dhcp6_messages.mes +++ b/src/bin/dhcp6/dhcp6_messages.mes @@ -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. diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index 8b389448f3..8eaa5c9e92 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -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(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(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(1));