]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3140] Post #4134 merge fixes
authorFrancis Dupont <fdupont@isc.org>
Thu, 16 Oct 2025 22:58:55 +0000 (00:58 +0200)
committerFrancis Dupont <fdupont@isc.org>
Wed, 5 Nov 2025 21:46:18 +0000 (22:46 +0100)
changelog_unreleased/3140-add-statistics-counters-for-dropped-packets
changelog_unreleased/4134-add-drop-stats-limit-exceeded [deleted file]
doc/sphinx/arm/dhcp4-srv.rst
doc/sphinx/arm/dhcp6-srv.rst
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp6/dhcp6_srv.cc

index 3547e9fd1ae6af2a2992e70286e0f2a187be0769..986b42512c47ecba53761e0308a16353e8f2e885 100644 (file)
@@ -20,4 +20,8 @@
        statistics which are increased when an incoming packet
        was dropped because an unexpected exception was thrown
        during processing.
-       (Gitlab #3140, #4157, #4146, #4127, #4126, #4133)
+
+       Added "pkt4-limit-exceeded" and "pkt6-limit-exceeded"
+       statistics which are increased when an incoming packet
+       was dropped by the limits hook library.
+       (Gitlab #3140, #4157, #4146, #4127, #4126, #4133, #4134)
diff --git a/changelog_unreleased/4134-add-drop-stats-limit-exceeded b/changelog_unreleased/4134-add-drop-stats-limit-exceeded
deleted file mode 100644 (file)
index 445f880..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-[func]         fdupont
-       Added "pkt4-limit-exceeded" and "pkt6-limit-exceeded"
-       statistics which are increased when an incoming packet
-       was dropped by the limits hook library.
-       (Gitlab #4134)
index 6e04a2b9413e5384fa8b81c015edd02d6e2f8ede..2b3a75d4e6b65b7b563ae3501b3cddc241ebb27c 100644 (file)
@@ -7835,9 +7835,6 @@ a second counter detailing the drop cause:
 
 - ``pkt4-parse-failed`` - packet parsing raised a fatal error
 
-- ``pkt4-limit-exceeded`` - dropped by the limits (:ref:`hooks-limits`)
-  hook library
-
 - ``pkt4-queue-full`` - parked packet in a queue which became full
 
 - ``pkt4-rfc-violation`` - RFC violation (i.e. protocol specs instruct to drop them)
@@ -7848,6 +7845,9 @@ a second counter detailing the drop cause:
 
 - ``pkt4-processing-failed`` - git an unexpected exception during processing
 
+- ``pkt4-limit-exceeded`` - dropped by the limits (:ref:`hooks-limits`)
+  hook library
+
 .. note::
 
    The pool ID can be configured on each pool by explicitly setting the ``pool-id``
index 98a8c1f67edca63ccf42216c9f64625b3447bbee..a148d33a65ed1f1452c19facb3bdf92c5d0660a3 100644 (file)
@@ -6952,18 +6952,6 @@ The DHCPv6 server supports the following statistics:
    |                                                   |                | This statistic is expected to grow |
    |                                                   |                | rapidly.                           |
    +---------------------------------------------------+----------------+------------------------------------+
-   | pkt6-receive-drop                                 | integer        | Number of incoming packets that    |
-   |                                                   |                | were dropped. The exact reason for |
-   |                                                   |                | dropping packets is logged, but    |
-   |                                                   |                | the most common reasons may be     |
-   |                                                   |                | that an unacceptable or            |
-   |                                                   |                | not-supported packet type is       |
-   |                                                   |                | received, direct responses are     |
-   |                                                   |                | forbidden, the server ID sent by   |
-   |                                                   |                | the client does not match the      |
-   |                                                   |                | server's server ID, or the packet  |
-   |                                                   |                | is malformed.                      |
-   +---------------------------------------------------+----------------+------------------------------------+
    | pkt6-service-disabled                             | integer        | Number of incoming packets that    |
    |                                                   |                | were dropped when the DHCP service |
    |                                                   |                | was disabled.                      |
@@ -7005,6 +6993,18 @@ The DHCPv6 server supports the following statistics:
    |                                                   |                | were dropped by the ``limits``     |
    |                                                   |                | hook library.                      |
    +---------------------------------------------------+----------------+------------------------------------+
+   | pkt6-receive-drop                                 | integer        | Number of incoming packets that    |
+   |                                                   |                | were dropped. The exact reason for |
+   |                                                   |                | dropping packets is logged, but    |
+   |                                                   |                | the most common reasons may be     |
+   |                                                   |                | that an unacceptable or            |
+   |                                                   |                | not-supported packet type is       |
+   |                                                   |                | received, direct responses are     |
+   |                                                   |                | forbidden, the server ID sent by   |
+   |                                                   |                | the client does not match the      |
+   |                                                   |                | server's server ID, or the packet  |
+   |                                                   |                | is malformed.                      |
+   +---------------------------------------------------+----------------+------------------------------------+
    | pkt6-solicit-received                             | integer        | Number of SOLICIT packets          |
    |                                                   |                | received. This statistic is        |
    |                                                   |                | expected to grow; its increase     |
@@ -7730,9 +7730,6 @@ a second counter detailing the drop cause:
 
 - ``pkt6-parse-failed`` - packet parsing raised a fatal error
 
-- ``pkt6-limit-exceeded`` - dropped by the limits (:ref:`hooks-limits`)
-  hook library
-
 - ``pkt6-queue-full`` - parked packet in a queue which became full
 
 - ``pkt6-rfc-violation`` - RFC violation (i.e. protocol specs instruct to drop them)
@@ -7743,6 +7740,9 @@ a second counter detailing the drop cause:
 
 - ``pkt6-processing-failed`` - git an unexpected exception during processing
 
+- ``pkt6-limit-exceeded`` - dropped by the limits (:ref:`hooks-limits`)
+  hook library
+
 .. note::
 
    The pool ID can be configured on each pool by explicitly setting the ``pool-id``
index 4034b017b52ebb0afd9e22753b1dc169d48aff67..c232a68b5a884eccb6485395b14d1ddda2747860 100644 (file)
@@ -826,10 +826,10 @@ Dhcpv4Srv::selectSubnet(const Pkt4Ptr& query, bool& drop, bool allow_answer_park
                       DHCP4_HOOK_SUBNET4_SELECT_PARKING_LOT_FULL)
                 .arg(limit)
                 .arg(query->getLabel());
-            isc::stats::StatsMgr::instance().addValue("pkt4-queue-full",
-                                                      static_cast<int64_t>(1));
-            isc::stats::StatsMgr::instance().addValue("pkt4-receive-drop",
-                                                      static_cast<int64_t>(1));
+            StatsMgr::instance().addValue("pkt4-queue-full",
+                                          static_cast<int64_t>(1));
+            StatsMgr::instance().addValue("pkt4-receive-drop",
+                                          static_cast<int64_t>(1));
             return (ConstSubnet4Ptr());
         }
 
@@ -997,10 +997,10 @@ Dhcpv4Srv::selectSubnet4o6(const Pkt4Ptr& query, bool& drop,
                       DHCP4_HOOK_SUBNET4_SELECT_4O6_PARKING_LOT_FULL)
                 .arg(limit)
                 .arg(query->getLabel());
-            isc::stats::StatsMgr::instance().addValue("pkt4-queue-full",
-                                                      static_cast<int64_t>(1));
-            isc::stats::StatsMgr::instance().addValue("pkt4-receive-drop",
-                                                      static_cast<int64_t>(1));
+            StatsMgr::instance().addValue("pkt4-queue-full",
+                                          static_cast<int64_t>(1));
+            StatsMgr::instance().addValue("pkt4-receive-drop",
+                                          static_cast<int64_t>(1));
             return (ConstSubnet4Ptr());
         }
 
index 33d92fb427a3da6178f0598343afdb6dc0883216..4ba05feca5743342d0bdc2974c7bfea655bea4a8 100644 (file)
@@ -2190,10 +2190,10 @@ Dhcpv6Srv::selectSubnet(const Pkt6Ptr& question, bool& drop) {
                       DHCP4_HOOK_SUBNET6_SELECT_PARKING_LOT_FULL)
                 .arg(limit)
                 .arg(question->getLabel());
-            isc::stats::StatsMgr::instance().addValue("pkt6-queue-full",
-                                                      static_cast<int64_t>(1));
-            isc::stats::StatsMgr::instance().addValue("pkt6-receive-drop",
-                                                      static_cast<int64_t>(1));
+            StatsMgr::instance().addValue("pkt6-queue-full",
+                                          static_cast<int64_t>(1));
+            StatsMgr::instance().addValue("pkt6-receive-drop",
+                                          static_cast<int64_t>(1));
             return (ConstSubnet6Ptr());
         }