From: Francis Dupont Date: Thu, 16 Oct 2025 14:24:37 +0000 (+0200) Subject: [#3140] [4156] Made skeleton X-Git-Tag: Kea-3.1.4~82 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8f8df56ed6690f4cccbae56eecc75d8a98d0c0ab;p=thirdparty%2Fkea.git [#3140] [4156] Made skeleton --- diff --git a/changelog_unreleased/4156-add-drop-stats-rfc-violation b/changelog_unreleased/4156-add-drop-stats-rfc-violation new file mode 100644 index 0000000000..cd190b1cb3 --- /dev/null +++ b/changelog_unreleased/4156-add-drop-stats-rfc-violation @@ -0,0 +1,5 @@ +[func] fdupont + Added "pkt4-rfc-violation" and "pkt6-rfc-violation" + statistics which are increased when an incoming packet + has to be dropped according to protocol specifications. + (Gitlab #4156) diff --git a/doc/sphinx/arm/dhcp4-srv.rst b/doc/sphinx/arm/dhcp4-srv.rst index d0646785dc..2ed8401e6d 100644 --- a/doc/sphinx/arm/dhcp4-srv.rst +++ b/doc/sphinx/arm/dhcp4-srv.rst @@ -7407,6 +7407,10 @@ The DHCPv4 server supports the following statistics: | | | were dropped when the queue they | | | | were parked became full. | +----------------------------------------------------+----------------+------------------------------------+ + | pkt4-rfc-violation | integer | Number of incoming packets that | + | | | were dropped following protocol | + | | | specifications. | + +----------------------------------------------------+----------------+------------------------------------+ | pkt4-receive-drop | integer | Number of incoming packets that | | | | were dropped. The exact reason for | | | | dropping packets is logged, but | @@ -7814,6 +7818,8 @@ a second counter detailing the drop cause: - ``pkt4-queue-full`` - parked packet in a queue which became full +- ``pkt4-rfc-violation`` - RFC violation (i.e. protocol specs instruct to drop them) + .. 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 e220310da3..067c778b60 100644 --- a/doc/sphinx/arm/dhcp6-srv.rst +++ b/doc/sphinx/arm/dhcp6-srv.rst @@ -6982,6 +6982,10 @@ The DHCPv6 server supports the following statistics: | | | were dropped when the queue they | | | | were parked became full. | +---------------------------------------------------+----------------+------------------------------------+ + | pkt6-rfc-violation | integer | Number of incoming packets that | + | | | were dropped following protocol | + | | | specifications. | + +---------------------------------------------------+----------------+------------------------------------+ | pkt6-solicit-received | integer | Number of SOLICIT packets | | | | received. This statistic is | | | | expected to grow; its increase | @@ -7709,6 +7713,8 @@ a second counter detailing the drop cause: - ``pkt6-queue-full`` - parked packet in a queue which became full +- ``pkt6-rfc-violation`` - RFC violation (i.e. protocol specs instruct to drop them) + .. 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 5f57a4ff5d..5c1ab4d608 100644 --- a/doc/sphinx/arm/stats.rst +++ b/doc/sphinx/arm/stats.rst @@ -334,6 +334,12 @@ Here is an example response returning all collected statistics: "2023-06-13 20:42:46.616343" ] ], + "pkt4-rfc-violation": [ + [ + 0, + "2023-06-13 20:42:46.616351" + ] + ], "pkt4-sent": [ [ 0, @@ -657,6 +663,12 @@ or "2023-06-13 21:28:57.177747" ] ], + "pkt6-rfc-violation": [ + [ + 0, + "2023-06-13 21:28:57.177747" + ] + ], "pkt6-sent": [ [ 0, @@ -1080,6 +1092,12 @@ Here is an example response returning all collected statistics: "2023-06-13 20:42:46.616343" ] ], + "pkt4-rfc-violation": [ + [ + 0, + "2023-06-13 20:42:46.616351" + ] + ], "pkt4-sent": [ [ 0, @@ -1319,6 +1337,12 @@ or "2023-06-13 21:28:57.177747" ] ], + "pkt6-rfc-violation": [ + [ + 0, + "2023-06-13 21:28:57.177747" + ] + ], "pkt6-sent": [ [ 0, diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index 8609f1d215..87d362f613 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -184,6 +184,7 @@ std::set dhcp4_statistics = { "pkt4-service-disabled", "pkt4-parse-failed", "pkt4-queue-full", + "pkt4-rfc-violation", "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 de742efb5b..1f79c469ce 100644 --- a/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc +++ b/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc @@ -631,6 +631,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, controlChannelStats) { "pkt4-service-disabled", "pkt4-parse-failed", "pkt4-queue-full", + "pkt4-rfc-violation", "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 12971db05b..cc25dd08b1 100644 --- a/src/bin/dhcp4/tests/http_control_socket_unittest.cc +++ b/src/bin/dhcp4/tests/http_control_socket_unittest.cc @@ -942,6 +942,7 @@ BaseCtrlChannelDhcpv4Test::testControlChannelStats() { "pkt4-service-disabled", "pkt4-parse-failed", "pkt4-queue-full", + "pkt4-rfc-violation", "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 493a59ea8c..a542f20e45 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -244,6 +244,7 @@ std::set dhcp6_statistics = { "pkt6-service-disabled", "pkt6-parse-failed", "pkt6-queue-full", + "pkt6-rfc-violation", "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 bb91daeef1..2d280247df 100644 --- a/src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc +++ b/src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc @@ -639,6 +639,7 @@ TEST_F(CtrlChannelDhcpv6SrvTest, controlChannelStats) { "pkt6-service-disabled", "pkt6-parse-failed", "pkt6-queue-full", + "pkt6-rfc-violation", "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 5c9b4a7f43..bf25a6bb0b 100644 --- a/src/bin/dhcp6/tests/http_control_socket_unittest.cc +++ b/src/bin/dhcp6/tests/http_control_socket_unittest.cc @@ -957,6 +957,7 @@ BaseCtrlChannelDhcpv6Test::testControlChannelStats() { "pkt6-service-disabled", "pkt6-parse-failed", "pkt6-queue-full", + "pkt6-rfc-violation", "pkt6-receive-drop", "v6-allocation-fail", "v6-allocation-fail-shared-network",