All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1 0/1] package/dot1ag-utils: new package
@ 2026-01-07 17:53 Vincent Jardin via buildroot
  2026-01-07 17:53 ` [Buildroot] [PATCH v1 1/1] " Vincent Jardin via buildroot
  0 siblings, 1 reply; 7+ messages in thread
From: Vincent Jardin via buildroot @ 2026-01-07 17:53 UTC (permalink / raw)
  To: buildroot; +Cc: vjardin

This patch adds dot1ag-utils, which provides tools for IEEE 802.1ag
Connectivity Fault Management (CFM) protocol testing and debugging.

CI build verification:
https://gitlab.com/vjardin/buildroot/-/pipelines/2249786419

Vincent Jardin (1):
  package/dot1ag-utils: new package

 DEVELOPERS                                                  |  1 +
 package/Config.in                                           |  1 +
 package/dot1ag-utils/0001-fix-strncpy-truncation-warnings.patch | 60 +++++
 package/dot1ag-utils/Config.in                              |  9 +
 package/dot1ag-utils/dot1ag-utils.hash                      |  3 +
 package/dot1ag-utils/dot1ag-utils.mk                        | 19 ++
 6 files changed, 93 insertions(+)

-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH v1 1/1] package/dot1ag-utils: new package
  2026-01-07 17:53 [Buildroot] [PATCH v1 0/1] package/dot1ag-utils: new package Vincent Jardin via buildroot
@ 2026-01-07 17:53 ` Vincent Jardin via buildroot
  2026-01-07 22:36   ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 7+ messages in thread
From: Vincent Jardin via buildroot @ 2026-01-07 17:53 UTC (permalink / raw)
  To: buildroot; +Cc: vjardin

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

diff --git a/DEVELOPERS b/DEVELOPERS
index f982e3123a..f5d82280dc 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -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/
diff --git a/package/Config.in b/package/Config.in
index def3db0e50..90e2b085f0 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/dot1ag-utils/0001-fix-strncpy-truncation-warnings.patch b/package/dot1ag-utils/0001-fix-strncpy-truncation-warnings.patch
new file mode 100644
index 0000000000..b987a45aa3
--- /dev/null
+++ b/package/dot1ag-utils/0001-fix-strncpy-truncation-warnings.patch
@@ -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);
diff --git a/package/dot1ag-utils/Config.in b/package/dot1ag-utils/Config.in
new file mode 100644
index 0000000000..eabe0d9b51
--- /dev/null
+++ b/package/dot1ag-utils/Config.in
@@ -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
diff --git a/package/dot1ag-utils/dot1ag-utils.hash b/package/dot1ag-utils/dot1ag-utils.hash
new file mode 100644
index 0000000000..5d0b3b8346
--- /dev/null
+++ b/package/dot1ag-utils/dot1ag-utils.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  2dcec34d4c9849b7d15a88aedb65eb6911a813e7f1535222513f4c7abecacc49  dot1ag-utils-4886d70ba83166bd1333eb04df8198a8ddfc5680.tar.gz
+sha256  08f7c06906976be9ee27339b268a57a85900928bcb394633382a73268fdc3868  LICENSE
diff --git a/package/dot1ag-utils/dot1ag-utils.mk b/package/dot1ag-utils/dot1ag-utils.mk
new file mode 100644
index 0000000000..1cde7299a0
--- /dev/null
+++ b/package/dot1ag-utils/dot1ag-utils.mk
@@ -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))
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH v1 1/1] package/dot1ag-utils: new package
  2026-01-07 17:53 ` [Buildroot] [PATCH v1 1/1] " Vincent Jardin via buildroot
@ 2026-01-07 22:36   ` Thomas Petazzoni via buildroot
  2026-01-18 22:12     ` [Buildroot] [PATCH v2 0/1] " Vincent Jardin via buildroot
  2026-01-18 22:21     ` [Buildroot] [PATCH v3 0/1] " Vincent Jardin via buildroot
  0 siblings, 2 replies; 7+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-01-07 22:36 UTC (permalink / raw)
  To: Vincent Jardin via buildroot; +Cc: Vincent Jardin

Hello Vincent,

Thanks for this patch. For series of just 1 patch, you don't need to
send a cover letter. It's OK to have one of course, but it's not
necessary.

On Wed,  7 Jan 2026 18:53:39 +0100
Vincent Jardin via buildroot <buildroot@buildroot.org> wrote:

> diff --git a/package/dot1ag-utils/0001-fix-strncpy-truncation-warnings.patch b/package/dot1ag-utils/0001-fix-strncpy-truncation-warnings.patch
> new file mode 100644
> index 0000000000..b987a45aa3
> --- /dev/null
> +++ b/package/dot1ag-utils/0001-fix-strncpy-truncation-warnings.patch
> @@ -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>

Needs an Upstream: tag that provides details on the upstream status of
this patch.

> --- /dev/null
> +++ b/package/dot1ag-utils/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_DOT1AG_UTILS
> +	bool "dot1ag-utils (IEEE 802.1ag tools)"

Should be just:

	bool "dot1g-utils"

> +	select BR2_PACKAGE_LIBPCAP

If you select a package, you need to replicate its dependencies, in
this case:

	depends on BR2_USE_MMU

> diff --git a/package/dot1ag-utils/dot1ag-utils.mk b/package/dot1ag-utils/dot1ag-utils.mk
> new file mode 100644
> index 0000000000..1cde7299a0
> --- /dev/null
> +++ b/package/dot1ag-utils/dot1ag-utils.mk
> @@ -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

                       ^^^^^^ just one space before/after the = sign

> +DOT1AG_UTILS_LICENSE_FILES = LICENSE
> +
> +DOT1AG_UTILS_DEPENDENCIES = libpcap
> +
> +DOT1AG_UTILS_AUTORECONF = YES

You can probably drop the empty new lines between all those variable
definitions.

> +
> +$(eval $(autotools-package))

The rest looks good to me.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH v2 0/1] package/dot1ag-utils: new package
  2026-01-07 22:36   ` Thomas Petazzoni via buildroot
@ 2026-01-18 22:12     ` Vincent Jardin via buildroot
  2026-01-18 22:12       ` [Buildroot] [PATCH v2 1/1] " Vincent Jardin via buildroot
  2026-01-18 22:21     ` [Buildroot] [PATCH v3 0/1] " Vincent Jardin via buildroot
  1 sibling, 1 reply; 7+ messages in thread
From: Vincent Jardin via buildroot @ 2026-01-18 22:12 UTC (permalink / raw)
  To: buildroot; +Cc: thomas.petazzoni, Vincent Jardin

dot1ag-utils is an open source implementation of the IEEE 802.1ag
protocol providing Ethernet OAM (Operations, Administration, and
Maintenance) utilities including ethping, ethtrace, dot1agd, and
dot1ag_ccd.

Changes since v1:
  - Added `Upstream: not yet submitted` tag to patch
  - Simplified bool label to just "dot1ag-utils"
  - Fixed .mk file formatting (single space around =, no empty lines)
  - Note: libpcap does not have BR2_USE_MMU dependency, so despite
    Thomas' suggestion, this dependency was not added to dot1ag-utils.

CI: https://gitlab.com/buildroot.org/buildroot/-/pipelines/1702893660

Vincent Jardin (1):
  package/dot1ag-utils: new package

 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 ...0001-fix-strncpy-truncation-warnings.patch | 60 +++++++++++++++++++
 package/dot1ag-utils/Config.in                | 11 ++++
 package/dot1ag-utils/dot1ag-utils.hash        |  3 +
 package/dot1ag-utils/dot1ag-utils.mk          | 14 +++++
 6 files changed, 90 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

-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH v2 1/1] package/dot1ag-utils: new package
  2026-01-18 22:12     ` [Buildroot] [PATCH v2 0/1] " Vincent Jardin via buildroot
@ 2026-01-18 22:12       ` Vincent Jardin via buildroot
  0 siblings, 0 replies; 7+ messages in thread
From: Vincent Jardin via buildroot @ 2026-01-18 22:12 UTC (permalink / raw)
  To: buildroot; +Cc: thomas.petazzoni, Vincent Jardin

dot1ag-utils provides tools for IEEE 802.1ag Connectivity Fault
Management (CFM) protocol testing and debugging.

https://github.com/Bumblebee-Networks/dot1ag-utils
Signed-off-by: Vincent Jardin <vjardin@free.fr>
---
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 ...0001-fix-strncpy-truncation-warnings.patch | 60 +++++++++++++++++++
 package/dot1ag-utils/Config.in                | 11 ++++
 package/dot1ag-utils/dot1ag-utils.hash        |  3 +
 package/dot1ag-utils/dot1ag-utils.mk          | 14 +++++
 6 files changed, 90 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

diff --git a/DEVELOPERS b/DEVELOPERS
index f982e3123a..f5d82280dc 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -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/
diff --git a/package/Config.in b/package/Config.in
index def3db0e50..918c82550e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -176,6 +176,7 @@ menu "Development tools"
 	source "package/cvs/Config.in"
 	source "package/cxxtest/Config.in"
 	source "package/diffutils/Config.in"
+	source "package/dot1ag-utils/Config.in"
 	source "package/dos2unix/Config.in"
 	source "package/fd/Config.in"
 	source "package/findutils/Config.in"
diff --git a/package/dot1ag-utils/0001-fix-strncpy-truncation-warnings.patch b/package/dot1ag-utils/0001-fix-strncpy-truncation-warnings.patch
new file mode 100644
index 0000000000..a3b370a808
--- /dev/null
+++ b/package/dot1ag-utils/0001-fix-strncpy-truncation-warnings.patch
@@ -0,0 +1,60 @@
+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>
+Upstream: not yet submitted
+---
+ 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);
diff --git a/package/dot1ag-utils/Config.in b/package/dot1ag-utils/Config.in
new file mode 100644
index 0000000000..2dc906f7d7
--- /dev/null
+++ b/package/dot1ag-utils/Config.in
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_DOT1AG_UTILS
+	bool "dot1ag-utils"
+	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
diff --git a/package/dot1ag-utils/dot1ag-utils.hash b/package/dot1ag-utils/dot1ag-utils.hash
new file mode 100644
index 0000000000..5d0b3b8346
--- /dev/null
+++ b/package/dot1ag-utils/dot1ag-utils.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  2dcec34d4c9849b7d15a88aedb65eb6911a813e7f1535222513f4c7abecacc49  dot1ag-utils-4886d70ba83166bd1333eb04df8198a8ddfc5680.tar.gz
+sha256  08f7c06906976be9ee27339b268a57a85900928bcb394633382a73268fdc3868  LICENSE
diff --git a/package/dot1ag-utils/dot1ag-utils.mk b/package/dot1ag-utils/dot1ag-utils.mk
new file mode 100644
index 0000000000..7d433aa498
--- /dev/null
+++ b/package/dot1ag-utils/dot1ag-utils.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# 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))
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH v3 0/1] package/dot1ag-utils: new package
  2026-01-07 22:36   ` Thomas Petazzoni via buildroot
  2026-01-18 22:12     ` [Buildroot] [PATCH v2 0/1] " Vincent Jardin via buildroot
@ 2026-01-18 22:21     ` Vincent Jardin via buildroot
  2026-01-18 22:21       ` [Buildroot] [PATCH v3 1/1] " Vincent Jardin via buildroot
  1 sibling, 1 reply; 7+ messages in thread
From: Vincent Jardin via buildroot @ 2026-01-18 22:21 UTC (permalink / raw)
  To: buildroot; +Cc: thomas.petazzoni, Vincent Jardin

dot1ag-utils is an open source implementation of the IEEE 802.1ag
protocol providing Ethernet OAM (Operations, Administration, and
Maintenance) utilities including ethping, ethtrace, dot1agd, and
dot1ag_ccd.

Changes since v2:
  - Fix CI URL

Changes since v1:
  - Added `Upstream: not yet submitted` tag to patch
  - Simplified bool label to just "dot1ag-utils"
  - Fixed .mk file formatting (single space around =, no empty lines)
  - Note: libpcap does not have BR2_USE_MMU dependency, so despite
    Thomas' suggestion, this dependency was not added to dot1ag-utils.

CI: https://gitlab.com/vjardin/buildroot/-/pipelines/2270183801

Vincent Jardin (1):
  package/dot1ag-utils: new package

 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 ...0001-fix-strncpy-truncation-warnings.patch | 60 +++++++++++++++++++
 package/dot1ag-utils/Config.in                | 11 ++++
 package/dot1ag-utils/dot1ag-utils.hash        |  3 +
 package/dot1ag-utils/dot1ag-utils.mk          | 14 +++++
 6 files changed, 90 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

-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH v3 1/1] package/dot1ag-utils: new package
  2026-01-18 22:21     ` [Buildroot] [PATCH v3 0/1] " Vincent Jardin via buildroot
@ 2026-01-18 22:21       ` Vincent Jardin via buildroot
  0 siblings, 0 replies; 7+ messages in thread
From: Vincent Jardin via buildroot @ 2026-01-18 22:21 UTC (permalink / raw)
  To: buildroot; +Cc: thomas.petazzoni, Vincent Jardin

dot1ag-utils provides tools for IEEE 802.1ag Connectivity Fault
Management (CFM) protocol testing and debugging.

https://github.com/Bumblebee-Networks/dot1ag-utils
Signed-off-by: Vincent Jardin <vjardin@free.fr>
---
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 ...0001-fix-strncpy-truncation-warnings.patch | 60 +++++++++++++++++++
 package/dot1ag-utils/Config.in                | 11 ++++
 package/dot1ag-utils/dot1ag-utils.hash        |  3 +
 package/dot1ag-utils/dot1ag-utils.mk          | 14 +++++
 6 files changed, 90 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

diff --git a/DEVELOPERS b/DEVELOPERS
index f982e3123a..f5d82280dc 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -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/
diff --git a/package/Config.in b/package/Config.in
index def3db0e50..918c82550e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -176,6 +176,7 @@ menu "Development tools"
 	source "package/cvs/Config.in"
 	source "package/cxxtest/Config.in"
 	source "package/diffutils/Config.in"
+	source "package/dot1ag-utils/Config.in"
 	source "package/dos2unix/Config.in"
 	source "package/fd/Config.in"
 	source "package/findutils/Config.in"
diff --git a/package/dot1ag-utils/0001-fix-strncpy-truncation-warnings.patch b/package/dot1ag-utils/0001-fix-strncpy-truncation-warnings.patch
new file mode 100644
index 0000000000..a3b370a808
--- /dev/null
+++ b/package/dot1ag-utils/0001-fix-strncpy-truncation-warnings.patch
@@ -0,0 +1,60 @@
+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>
+Upstream: not yet submitted
+---
+ 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);
diff --git a/package/dot1ag-utils/Config.in b/package/dot1ag-utils/Config.in
new file mode 100644
index 0000000000..2dc906f7d7
--- /dev/null
+++ b/package/dot1ag-utils/Config.in
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_DOT1AG_UTILS
+	bool "dot1ag-utils"
+	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
diff --git a/package/dot1ag-utils/dot1ag-utils.hash b/package/dot1ag-utils/dot1ag-utils.hash
new file mode 100644
index 0000000000..5d0b3b8346
--- /dev/null
+++ b/package/dot1ag-utils/dot1ag-utils.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  2dcec34d4c9849b7d15a88aedb65eb6911a813e7f1535222513f4c7abecacc49  dot1ag-utils-4886d70ba83166bd1333eb04df8198a8ddfc5680.tar.gz
+sha256  08f7c06906976be9ee27339b268a57a85900928bcb394633382a73268fdc3868  LICENSE
diff --git a/package/dot1ag-utils/dot1ag-utils.mk b/package/dot1ag-utils/dot1ag-utils.mk
new file mode 100644
index 0000000000..7d433aa498
--- /dev/null
+++ b/package/dot1ag-utils/dot1ag-utils.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# 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))
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-01-18 22:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-07 17:53 [Buildroot] [PATCH v1 0/1] package/dot1ag-utils: new package Vincent Jardin via buildroot
2026-01-07 17:53 ` [Buildroot] [PATCH v1 1/1] " Vincent Jardin via buildroot
2026-01-07 22:36   ` Thomas Petazzoni via buildroot
2026-01-18 22:12     ` [Buildroot] [PATCH v2 0/1] " Vincent Jardin via buildroot
2026-01-18 22:12       ` [Buildroot] [PATCH v2 1/1] " Vincent Jardin via buildroot
2026-01-18 22:21     ` [Buildroot] [PATCH v3 0/1] " Vincent Jardin via buildroot
2026-01-18 22:21       ` [Buildroot] [PATCH v3 1/1] " Vincent Jardin via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.