Thread (2 messages) 2 messages, 2 authors, 2d ago
WARM2d

[PATCH net-next] net: ip6_tunnel: use tunnel parameters for fill_forward_path route lookup

From: Lorenzo Bianconi <lorenzo@kernel.org>
Date: 2026-07-08 12:48:44
Also in: netfilter-devel
Subsystem: networking [general], networking [ipv4/ipv6], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Ahern, Ido Schimmel, Linus Torvalds

Pass source address, output interface and flowlabel (carrying TClass
and flow label) from the tunnel configuration to the flowi6 struct in
ip6_tnl_fill_forward_path(), aligning the route lookup with the slow
path in ipxip6_tnl_xmit().

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 net/ipv6/ip6_tunnel.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index bf8e40af60b0..557d8637ac57 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -1847,6 +1847,10 @@ static int ip6_tnl_fill_forward_path(struct net_device_path_ctx *ctx,
 	struct ip6_tnl *t = netdev_priv(ctx->dev);
 	struct flowi6 fl6 = {
 		.daddr = t->parms.raddr,
+		.saddr = t->parms.laddr,
+		.flowi6_oif = t->parms.link,
+		.flowlabel = t->parms.flowinfo &
+			     (IPV6_TCLASS_MASK | IPV6_FLOWLABEL_MASK),
 	};
 	struct dst_entry *dst;
 	int err;
---
base-commit: 08030ddb87b4c6c6a2c03c82731b5e188f02f5b9
change-id: 20260708-ip6ip6-route-lookup-fill_forward_path-9fc45a9118e9

Best regards,
-- 
Lorenzo Bianconi [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help