* [PATCH net-next] ipv6: udp: Use ip6_sk_redirect() for tunnel sockets
@ 2026-09-07 10:13 Ido Schimmel
2026-09-07 13:06 ` Eric Dumazet
2026-09-08 12:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Ido Schimmel @ 2026-09-07 10:13 UTC (permalink / raw)
To: netdev
Cc: davem, kuba, pabeni, edumazet, willemdebruijn.kernel, horms,
Ido Schimmel
After commit cd51b74bdd0b ("ipv6: Fix redirect exception creation for
UDP/RAW sockets") the two redirect calls are now equivalent and there is
no need to specifically call ip6_redirect() for tunnel sockets. Simplify
and call ip6_sk_redirect() for both tunnel sockets and regular sockets.
Note that for ICMPv6 Redirect Message packets the VRF driver does not
reset skb->dev to the VRF device, so skb->dev->ifindex is equivalent to
inet6_iif(skb), even when the packet was received from a VRF port.
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---
net/ipv6/udp.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 93478d1ad576..59f9872c3552 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -751,13 +751,7 @@ static int udpv6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
harderr = 1;
}
if (type == NDISC_REDIRECT) {
- if (tunnel) {
- ip6_redirect(skb, sock_net(sk), inet6_iif(skb),
- READ_ONCE(sk->sk_mark),
- sk_uid(sk));
- } else {
- ip6_sk_redirect(skb, sk);
- }
+ ip6_sk_redirect(skb, sk);
goto out;
}
--
2.55.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] ipv6: udp: Use ip6_sk_redirect() for tunnel sockets
2026-09-07 10:13 [PATCH net-next] ipv6: udp: Use ip6_sk_redirect() for tunnel sockets Ido Schimmel
@ 2026-09-07 13:06 ` Eric Dumazet
2026-09-08 12:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2026-09-07 13:06 UTC (permalink / raw)
To: Ido Schimmel; +Cc: netdev, davem, kuba, pabeni, willemdebruijn.kernel, horms
On Mon, Sep 7, 2026 at 12:15 PM Ido Schimmel <idosch@nvidia.com> wrote:
>
> After commit cd51b74bdd0b ("ipv6: Fix redirect exception creation for
> UDP/RAW sockets") the two redirect calls are now equivalent and there is
> no need to specifically call ip6_redirect() for tunnel sockets. Simplify
> and call ip6_sk_redirect() for both tunnel sockets and regular sockets.
>
> Note that for ICMPv6 Redirect Message packets the VRF driver does not
> reset skb->dev to the VRF device, so skb->dev->ifindex is equivalent to
> inet6_iif(skb), even when the packet was received from a VRF port.
>
> Suggested-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Great, thanks.
Reviewed-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] ipv6: udp: Use ip6_sk_redirect() for tunnel sockets
2026-09-07 10:13 [PATCH net-next] ipv6: udp: Use ip6_sk_redirect() for tunnel sockets Ido Schimmel
2026-09-07 13:06 ` Eric Dumazet
@ 2026-09-08 12:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-09-08 12:50 UTC (permalink / raw)
To: Ido Schimmel
Cc: netdev, davem, kuba, pabeni, edumazet, willemdebruijn.kernel,
horms
Hello:
This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Mon, 7 Sep 2026 13:13:58 +0300 you wrote:
> After commit cd51b74bdd0b ("ipv6: Fix redirect exception creation for
> UDP/RAW sockets") the two redirect calls are now equivalent and there is
> no need to specifically call ip6_redirect() for tunnel sockets. Simplify
> and call ip6_sk_redirect() for both tunnel sockets and regular sockets.
>
> Note that for ICMPv6 Redirect Message packets the VRF driver does not
> reset skb->dev to the VRF device, so skb->dev->ifindex is equivalent to
> inet6_iif(skb), even when the packet was received from a VRF port.
>
> [...]
Here is the summary with links:
- [net-next] ipv6: udp: Use ip6_sk_redirect() for tunnel sockets
https://git.kernel.org/netdev/net-next/c/4596be8a15db
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-08 12:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07 10:13 [PATCH net-next] ipv6: udp: Use ip6_sk_redirect() for tunnel sockets Ido Schimmel
2026-09-07 13:06 ` Eric Dumazet
2026-09-08 12:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox