]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#4096] Moved pkt4-received
authorFrancis Dupont <fdupont@isc.org>
Mon, 15 Sep 2025 09:26:27 +0000 (11:26 +0200)
committerFrancis Dupont <fdupont@isc.org>
Thu, 18 Sep 2025 17:35:04 +0000 (19:35 +0200)
src/bin/dhcp4/dhcp4_srv.cc

index 6cadcf40127d6aaeab9a4ed7502be48e1db664d5..87893bdae834541de197c21fc0afb6d3d4540c5d 100644 (file)
@@ -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<int64_t>(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<int64_t>(1));
-
     bool skip_unpack = false;
 
     // The packet has just been received so contains the uninterpreted wire