patch 'net: fix IPv6 link local compliance with RFC 4291' has been queued to stable release 24.11.4

Kevin Traynor ktraynor at redhat.com
Fri Nov 21 12:21:22 CET 2025


Hi,

FYI, your patch has been queued to stable release 24.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/26/25. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/129a914c3f0e8c8604366a5625c91c6ec4a2dd23

Thanks.

Kevin

---
>From 129a914c3f0e8c8604366a5625c91c6ec4a2dd23 Mon Sep 17 00:00:00 2001
From: Christophe Fontaine <cfontain at redhat.com>
Date: Tue, 18 Nov 2025 18:45:26 +0100
Subject: [PATCH] net: fix IPv6 link local compliance with RFC 4291

[ upstream commit 9727c1bae406fc080fdfcf3dae5c7a699e896b53 ]

As specified in RFC 4291 section 2.5.1, link local addresses must be
generated based on a modified EUI-64 interface identifier:

> Modified EUI-64 format interface identifiers are formed by inverting
> the "u" bit (universal/local bit in IEEE EUI-64 terminology) when
> forming the interface identifier from IEEE EUI-64 identifiers.

This translates to 'mac->addr_bytes[0] ^= 0x02'.

Fixes: 3d6d85f58c1c ("net: add utilities for well known IPv6 address types")

Signed-off-by: Christophe Fontaine <cfontain at redhat.com>
Signed-off-by: Robin Jarry <rjarry at redhat.com>
---
 app/test/test_net_ip6.c | 2 +-
 lib/net/rte_ip6.h       | 9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/app/test/test_net_ip6.c b/app/test/test_net_ip6.c
index cfc5509403..e4642c9a39 100644
--- a/app/test/test_net_ip6.c
+++ b/app/test/test_net_ip6.c
@@ -161,5 +161,5 @@ test_ipv6_llocal_from_ethernet(void)
 	const struct rte_ether_addr local_mac = {{0x04, 0x7b, 0xcb, 0x5c, 0x08, 0x44}};
 	const struct rte_ipv6_addr local_ip =
-		RTE_IPV6(0xfe80, 0, 0, 0, 0x047b, 0xcbff, 0xfe5c, 0x0844);
+		RTE_IPV6(0xfe80, 0, 0, 0, 0x067b, 0xcbff, 0xfe5c, 0x0844);
 	struct rte_ipv6_addr ip;
 
diff --git a/lib/net/rte_ip6.h b/lib/net/rte_ip6.h
index 8763ccbb5e..cb59e85c7e 100644
--- a/lib/net/rte_ip6.h
+++ b/lib/net/rte_ip6.h
@@ -394,5 +394,5 @@ rte_ipv6_mc_scope(const struct rte_ipv6_addr *ip)
 /*
  * Generate a link-local IPv6 address from an Ethernet address as specified in
- * RFC 2464, section 5.
+ * RFC 4291, section 2.5.1.
  *
  * @param[out] ip
@@ -407,5 +407,10 @@ rte_ipv6_llocal_from_ethernet(struct rte_ipv6_addr *ip, const struct rte_ether_a
 	ip->a[1] = 0x80;
 	memset(&ip->a[2], 0, 6);
-	ip->a[8] = mac->addr_bytes[0];
+	/*
+	 * The "u" bit (universal/local bit in IEEE EUI-64 terminology)
+	 * must be inverted for IPv6 link local address.
+	 * 0 means local scope, 1 means universal scope.
+	 */
+	ip->a[8] = mac->addr_bytes[0] ^ RTE_ETHER_LOCAL_ADMIN_ADDR;
 	ip->a[9] = mac->addr_bytes[1];
 	ip->a[10] = mac->addr_bytes[2];
-- 
2.51.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-11-21 11:05:12.633002126 +0000
+++ 0098-net-fix-IPv6-link-local-compliance-with-RFC-4291.patch	2025-11-21 11:05:09.657252389 +0000
@@ -1 +1 @@
-From 9727c1bae406fc080fdfcf3dae5c7a699e896b53 Mon Sep 17 00:00:00 2001
+From 129a914c3f0e8c8604366a5625c91c6ec4a2dd23 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9727c1bae406fc080fdfcf3dae5c7a699e896b53 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -37 +38 @@
-index 98bcac3f4d..d1abf1f5d5 100644
+index 8763ccbb5e..cb59e85c7e 100644



More information about the stable mailing list