From: Francis Dupont Date: Thu, 16 Oct 2025 14:40:50 +0000 (+0200) Subject: [#3140] [4126] Made skeleton X-Git-Tag: Kea-3.1.4~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b68f6d0bada070d8e59fb0a04b5327a7d5ec6533;p=thirdparty%2Fkea.git [#3140] [4126] Made skeleton --- 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 index 0000000000..d1f005648a --- /dev/null +++ b/changelog_unreleased/4126-add-drop-stats-not-for-us @@ -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) diff --git a/doc/sphinx/arm/dhcp4-srv.rst b/doc/sphinx/arm/dhcp4-srv.rst index 4987774a0c..4e28e590c1 100644 --- a/doc/sphinx/arm/dhcp4-srv.rst +++ b/doc/sphinx/arm/dhcp4-srv.rst @@ -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`` diff --git a/doc/sphinx/arm/dhcp6-srv.rst b/doc/sphinx/arm/dhcp6-srv.rst index 1156a99eec..a958695ab0 100644 --- a/doc/sphinx/arm/dhcp6-srv.rst +++ b/doc/sphinx/arm/dhcp6-srv.rst @@ -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`` diff --git a/doc/sphinx/arm/stats.rst b/doc/sphinx/arm/stats.rst index 32e8e458e2..a91ad39349 100644 --- a/doc/sphinx/arm/stats.rst +++ b/doc/sphinx/arm/stats.rst @@ -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, diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index c5aee88fb3..1949e2ee40 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -186,6 +186,7 @@ std::set 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", diff --git a/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc b/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc index 649759cc6b..3d1b6fafb5 100644 --- a/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc +++ b/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc @@ -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", diff --git a/src/bin/dhcp4/tests/http_control_socket_unittest.cc b/src/bin/dhcp4/tests/http_control_socket_unittest.cc index 409c60a429..02712867f7 100644 --- a/src/bin/dhcp4/tests/http_control_socket_unittest.cc +++ b/src/bin/dhcp4/tests/http_control_socket_unittest.cc @@ -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", diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index 2e14686d30..b0e2b4055a 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -246,6 +246,7 @@ std::set 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", diff --git a/src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc b/src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc index 6e1bae02c9..fdc0e6e30b 100644 --- a/src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc +++ b/src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc @@ -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", diff --git a/src/bin/dhcp6/tests/http_control_socket_unittest.cc b/src/bin/dhcp6/tests/http_control_socket_unittest.cc index ae6f0891fa..4ed75b7620 100644 --- a/src/bin/dhcp6/tests/http_control_socket_unittest.cc +++ b/src/bin/dhcp6/tests/http_control_socket_unittest.cc @@ -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",