From 4c96e872ebb17473b59fa689e322173fcade4a03 Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Mon, 15 Sep 2025 11:26:27 +0200 Subject: [PATCH] [#4096] Moved pkt4-received --- src/bin/dhcp4/dhcp4_srv.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index 6cadcf4012..87893bdae8 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -1245,6 +1245,13 @@ Dhcpv4Srv::runOne() { .arg(query->getLocalAddr().toText()) .arg(query->getLocalPort()) .arg(query->getIface()); + + // Log reception of the packet. We need to increase it early, as + // any failures in unpacking will cause the packet to be dropped. + // We will increase type specific statistic further down the road. + // See processStatsReceived(). + isc::stats::StatsMgr::instance().addValue("pkt4-received", + static_cast(1)); } // We used to log that the wait was interrupted, but this is no longer @@ -1326,13 +1333,6 @@ Dhcpv4Srv::processPacket(Pkt4Ptr query, bool allow_answer_park) { // All packets belong to ALL. query->addClass("ALL"); - // Log reception of the packet. We need to increase it early, as any - // failures in unpacking will cause the packet to be dropped. We - // will increase type specific statistic further down the road. - // See processStatsReceived(). - isc::stats::StatsMgr::instance().addValue("pkt4-received", - static_cast(1)); - bool skip_unpack = false; // The packet has just been received so contains the uninterpreted wire -- 2.47.3