Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] net: ip6_tunnel: use tunnel parameters for fill_forward_path route lookup
@ 2026-07-08 12:48 Lorenzo Bianconi
  2026-07-08 15:42 ` David Ahern
  0 siblings, 1 reply; 2+ messages in thread
From: Lorenzo Bianconi @ 2026-07-08 12:48 UTC (permalink / raw)
  To: David Ahern, Ido Schimmel, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Simon Horman, Pablo Neira Ayuso,
	Florian Westphal
  Cc: netdev, netfilter-devel, Lorenzo Bianconi

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 <lorenzo@kernel.org>


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

end of thread, other threads:[~2026-07-08 15:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08 12:48 [PATCH net-next] net: ip6_tunnel: use tunnel parameters for fill_forward_path route lookup Lorenzo Bianconi
2026-07-08 15:42 ` David Ahern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox