From: Francis Dupont Date: Mon, 15 Sep 2025 09:26:27 +0000 (+0200) Subject: [#4096] Moved pkt4-received X-Git-Tag: Kea-3.1.2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4c96e872ebb17473b59fa689e322173fcade4a03;p=thirdparty%2Fkea.git [#4096] Moved pkt4-received --- 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