@@ -3356,6 +3356,7 @@ N: Vincent Jardin <vjardin@free.fr>
F: board/nvidia/bf3/
F: configs/nvidia_bf3_defconfig
F: package/bfscripts/
+F: package/dot1ag-utils/
F: package/dpdk/
F: package/libecoli/
F: package/libyang-cpp/
@@ -2433,6 +2433,7 @@ endif
source "package/dhcpcd/Config.in"
source "package/dhcpdump/Config.in"
source "package/dnsmasq/Config.in"
+ source "package/dot1ag-utils/Config.in"
source "package/drbd-utils/Config.in"
source "package/dropbear/Config.in"
source "package/easyframes/Config.in"
new file mode 100644
@@ -0,0 +1,59 @@
+From: Vincent Jardin <vjardin@free.fr>
+Date: Tue, 7 Jan 2026 11:00:00 +0100
+Subject: [PATCH] dot1ag_eth: fix strncpy truncation warnings with modern GCC
+
+Modern GCC with -Werror fails when strncpy size equals the destination
+buffer size, as it may not null-terminate the string:
+
+ error: '__builtin_strncpy' specified bound 16 equals destination size
+ [-Werror=stringop-truncation]
+
+Fix by using sizeof(dest) - 1 to leave room for the null terminator.
+The structures are already zeroed with memset() before strncpy, so the
+last byte remains '\0'.
+
+Signed-off-by: Vincent Jardin <vjardin@free.fr>
+---
+ src/dot1ag_eth.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/dot1ag_eth.c b/src/dot1ag_eth.c
+index 1111111..2222222 100644
+--- a/src/dot1ag_eth.c
++++ b/src/dot1ag_eth.c
+@@ -122,7 +122,7 @@ get_local_mac(uint8_t *ea, const char *ifname) {
+ }
+
+ /* bind BPF to the outgoing interface */
+- strncpy(ifc.ifr_name, ifname, IFNAMSIZ);
++ strncpy(ifc.ifr_name, ifname, IFNAMSIZ - 1);
+ if (ioctl(bpf, BIOCSETIF, &ifc) > 0) {
+ perror("BIOCSETIF");
+ exit(EXIT_FAILURE);
+@@ -159,7 +159,7 @@ send_packet(const char *dev, const uint8_t *buf, size_t size) {
+
+ /* get interface index */
+ memset(&req, 0, sizeof(req));
+- strncpy(req.ifr_name, dev, sizeof(req.ifr_name));
++ strncpy(req.ifr_name, dev, sizeof(req.ifr_name) - 1);
+
+ /* get MAC address of interface */
+ if (ioctl(s, SIOCGIFHWADDR, &req)) {
+@@ -202,7 +202,7 @@ send_packet_old(const char *ifname, const uint8_t *buf, size_t size) {
+
+ /* Get interface index once */
+ memset(&req, 0, sizeof(req));
+- strncpy(req.ifr_name, ifname, sizeof(req.ifr_name));
++ strncpy(req.ifr_name, ifname, sizeof(req.ifr_name) - 1);
+ if (ioctl(s, SIOCGIFINDEX, &req) < 0) {
+ perror(ifname);
+ exit(EXIT_FAILURE);
+@@ -250,7 +250,7 @@ send_packet_old(const char *ifname, const uint8_t *buf, size_t size) {
+
+ /* get interface index */
+ memset(&req, 0, sizeof(req));
+- strncpy(req.ifr_name, ifname, sizeof(req.ifr_name));
++ strncpy(req.ifr_name, ifname, sizeof(req.ifr_name) - 1);
+ if (ioctl(s, SIOCGIFINDEX, &req)) {
+ perror(ifname);
+ exit(EXIT_FAILURE);
new file mode 100644
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_DOT1AG_UTILS
+ bool "dot1ag-utils (IEEE 802.1ag tools)"
+ select BR2_PACKAGE_LIBPCAP
+ help
+ 802.1ag Ethernet OAM utilities: ethping, ethtrace,
+ dot1agd, dot1ag_ccd, etc.
+
+ User-space implementation of IEEE 802.1ag, useful to test
+ Ethernet OAM / CFM connectivity (L2 ping/trace).
+
+ https://github.com/Bumblebee-Networks/dot1ag-utils
new file mode 100644
@@ -0,0 +1,3 @@
+# Locally computed
+sha256 2dcec34d4c9849b7d15a88aedb65eb6911a813e7f1535222513f4c7abecacc49 dot1ag-utils-4886d70ba83166bd1333eb04df8198a8ddfc5680.tar.gz
+sha256 08f7c06906976be9ee27339b268a57a85900928bcb394633382a73268fdc3868 LICENSE
new file mode 100644
@@ -0,0 +1,17 @@
+################################################################################
+#
+# dot1ag-utils
+#
+################################################################################
+
+DOT1AG_UTILS_VERSION = 4886d70ba83166bd1333eb04df8198a8ddfc5680
+DOT1AG_UTILS_SITE = $(call github,Bumblebee-Networks,dot1ag-utils,$(DOT1AG_UTILS_VERSION))
+
+DOT1AG_UTILS_LICENSE = BSD-2-Clause
+DOT1AG_UTILS_LICENSE_FILES = LICENSE
+
+DOT1AG_UTILS_DEPENDENCIES = libpcap
+
+DOT1AG_UTILS_AUTORECONF = YES
+
+$(eval $(autotools-package))
dot1ag-utils provides tools for IEEE 802.1ag Connectivity Fault Management (CFM) protocol testing and debugging. Signed-off-by: Vincent Jardin <vjardin@free.fr> --- DEVELOPERS | 1 + package/Config.in | 1 + ...0001-fix-strncpy-truncation-warnings.patch | 59 +++++++++++++++++++ package/dot1ag-utils/Config.in | 11 ++++ package/dot1ag-utils/dot1ag-utils.hash | 3 + package/dot1ag-utils/dot1ag-utils.mk | 17 ++++++ 6 files changed, 92 insertions(+) create mode 100644 package/dot1ag-utils/0001-fix-strncpy-truncation-warnings.patch create mode 100644 package/dot1ag-utils/Config.in create mode 100644 package/dot1ag-utils/dot1ag-utils.hash create mode 100644 package/dot1ag-utils/dot1ag-utils.mk