]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3140] [4126] Made skeleton
authorFrancis Dupont <fdupont@isc.org>
Thu, 16 Oct 2025 14:40:50 +0000 (16:40 +0200)
committerFrancis Dupont <fdupont@isc.org>
Wed, 5 Nov 2025 21:46:17 +0000 (22:46 +0100)
changelog_unreleased/4126-add-drop-stats-not-for-us [new file with mode: 0644]
doc/sphinx/arm/dhcp4-srv.rst
doc/sphinx/arm/dhcp6-srv.rst
doc/sphinx/arm/stats.rst
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc
src/bin/dhcp4/tests/http_control_socket_unittest.cc
src/bin/dhcp6/dhcp6_srv.cc
src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc
src/bin/dhcp6/tests/http_control_socket_unittest.cc

diff --git a/changelog_unreleased/4126-add-drop-stats-not-for-us b/changelog_unreleased/4126-add-drop-stats-not-for-us
new file mode 100644 (file)
index 0000000..d1f0056
--- /dev/null
@@ -0,0 +1,5 @@
+[func]         fdupont
+       Added "pkt4-not-for-us" and "pkt6-not-for-us"
+       statistics which are increased when an incoming packet
+       was dropped bease it has to be handled by another server.
+       (Gitlab #4126)
index 4987774a0cb0b97fab5acbfa32697d2a45f4bd3a..4e28e590c1adcdd393f2a591a2e7e74a95a6ae51 100644 (file)
@@ -7417,6 +7417,10 @@ The DHCPv4 server supports the following statistics:
    |                                                    |                | classifying the query into the     |
    |                                                    |                | ``DROP`` class.                    |
    +----------------------------------------------------+----------------+------------------------------------+
+   | pkt4-not-for-us                                    | integer        | Number of incoming packets that    |
+   |                                                    |                | was dropped because they had to be |
+   |                                                    |                | handled by another server.         |
+   +----------------------------------------------------+----------------+------------------------------------+
    | pkt4-receive-drop                                  | integer        | Number of incoming packets that    |
    |                                                    |                | were dropped. The exact reason for |
    |                                                    |                | dropping packets is logged, but    |
@@ -7828,6 +7832,8 @@ a second counter detailing the drop cause:
 
 - ``pkt4-admin-filtered`` - admin filtered out
 
+- ``pkt4-not-for-us`` - to be handled by another server
+
 .. note::
 
    The pool ID can be configured on each pool by explicitly setting the ``pool-id``
index 1156a99eec6d29398eabab0848f357d4fe46bc2e..a958695ab066af6a7e99d52c29676c41d7dcd61d 100644 (file)
@@ -6992,6 +6992,10 @@ The DHCPv6 server supports the following statistics:
    |                                                   |                | classifying the query into the     |
    |                                                   |                | ``DROP`` class.                    |
    +---------------------------------------------------+----------------+------------------------------------+
+   | pkt6-not-for-us                                   | integer        | Number of incoming packets that    |
+   |                                                   |                | was dropped because they had to be |
+   |                                                   |                | handled by another server.         |
+   +---------------------------------------------------+----------------+------------------------------------+
    | pkt6-solicit-received                             | integer        | Number of SOLICIT packets          |
    |                                                   |                | received. This statistic is        |
    |                                                   |                | expected to grow; its increase     |
@@ -7723,6 +7727,8 @@ a second counter detailing the drop cause:
 
 - ``pkt6-admin-filtered`` - admin filtered out
 
+- ``pkt6-not-for-us`` - to be handled by another server
+
 .. note::
 
    The pool ID can be configured on each pool by explicitly setting the ``pool-id``
index 32e8e458e21d3daf5c43e990ab907d7b1b215251..a91ad393497e825ab2d65991d2cbc8f5c1def0ce 100644 (file)
@@ -292,6 +292,12 @@ Here is an example response returning all collected statistics:
                    "2023-06-13 20:42:46.616314"
                ]
            ],
+           "pkt4-not-for-us": [
+               [
+                   0,
+                   "2023-06-13 20:42:46.616351"
+               ]
+           ],
            "pkt4-offer-received": [
                [
                    0,
@@ -615,6 +621,12 @@ or
                    "2023-06-13 21:28:57.177742"
                ]
            ],
+           "pkt6-not-for-us": [
+               [
+                   0,
+                   "2023-06-13 21:28:57.177747"
+               ]
+           ],
            "pkt6-parse-failed": [
                [
                    0,
@@ -1062,6 +1074,12 @@ Here is an example response returning all collected statistics:
                    "2023-06-13 20:42:46.616314"
                ]
            ],
+           "pkt4-not-for-us": [
+               [
+                   0,
+                   "2023-06-13 20:42:46.616351"
+               ]
+           ],
            "pkt4-offer-received": [
                [
                    0,
@@ -1301,6 +1319,12 @@ or
                    "2023-06-13 21:28:57.177742"
                ]
            ],
+           "pkt6-not-for-us": [
+               [
+                   0,
+                   "2023-06-13 21:28:57.177747"
+               ]
+           ],
            "pkt6-parse-failed": [
                [
                    0,
index c5aee88fb32fbe4ef0ad6c0a83b838351f347283..1949e2ee4081f5399cac535bcbfb816feaa87900 100644 (file)
@@ -186,6 +186,7 @@ std::set<std::string> dhcp4_statistics = {
     "pkt4-queue-full",
     "pkt4-rfc-violation",
     "pkt4-admin-filtered",
+    "pkt4-not-for-us",
     "pkt4-receive-drop",
     "v4-allocation-fail",
     "v4-allocation-fail-shared-network",
index 649759cc6b1e9f57125a3b26edb9d21e2d7cce16..3d1b6fafb543f7237b527ceffee67c331d1c047e 100644 (file)
@@ -633,6 +633,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, controlChannelStats) {
         "pkt4-queue-full",
         "pkt4-rfc-violation",
         "pkt4-admin-filtered",
+        "pkt4-not-for-us",
         "pkt4-receive-drop",
         "v4-allocation-fail",
         "v4-allocation-fail-shared-network",
index 409c60a4296b30f4f3878d22c1ecfb4fef52694a..02712867f7c946966d08f5a325d482c9d134967b 100644 (file)
@@ -944,6 +944,7 @@ BaseCtrlChannelDhcpv4Test::testControlChannelStats() {
         "pkt4-queue-full",
         "pkt4-rfc-violation",
         "pkt4-admin-filtered",
+        "pkt4-not-for-us",
         "pkt4-receive-drop",
         "v4-allocation-fail",
         "v4-allocation-fail-shared-network",
index 2e14686d308a3fe1afc1b87cf79eb37b62bd042b..b0e2b4055ae9b681bcfc1b8feacf88993172428c 100644 (file)
@@ -246,6 +246,7 @@ std::set<std::string> dhcp6_statistics = {
     "pkt6-queue-full",
     "pkt6-rfc-violation",
     "pkt6-admin-filtered",
+    "pkt6-not-for-us",
     "pkt6-receive-drop",
     "v6-allocation-fail",
     "v6-allocation-fail-shared-network",
index 6e1bae02c958cfc82adf6d291b978d7c4064e3cc..fdc0e6e30b7dabf75a6b04b6625b8c5e5f5d6bc2 100644 (file)
@@ -641,6 +641,7 @@ TEST_F(CtrlChannelDhcpv6SrvTest, controlChannelStats) {
         "pkt6-queue-full",
         "pkt6-rfc-violation",
         "pkt6-admin-filtered",
+        "pkt6-not-for-us",
         "pkt6-receive-drop",
         "v6-allocation-fail",
         "v6-allocation-fail-shared-network",
index ae6f0891fa1cff2845f3b522fbba84aefae6a953..4ed75b7620660b367b61449777ac6489477be8af 100644 (file)
@@ -959,6 +959,7 @@ BaseCtrlChannelDhcpv6Test::testControlChannelStats() {
         "pkt6-queue-full",
         "pkt6-rfc-violation",
         "pkt6-admin-filtered",
+        "pkt6-not-for-us",
         "pkt6-receive-drop",
         "v6-allocation-fail",
         "v6-allocation-fail-shared-network",