[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a918d777-36e7-4904-beaf-954455a29e92@kernel.org>
Date: Fri, 23 Jan 2026 11:13:26 -0700
From: David Ahern <dsahern@...nel.org>
To: Fernando Fernandez Mancera <fmancera@...e.de>, netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
horms@...nel.org, shuah@...nel.org, linux-kselftest@...r.kernel.org,
haleyb.dev@...il.com
Subject: Re: [PATCH 1/2 net-next v3] ipv6: use the right ifindex when replying
to icmpv6 from localhost
On 1/21/26 12:44 PM, Fernando Fernandez Mancera wrote:
> When replying to a ICMPv6 echo request that comes from localhost address
> the right output ifindex is 1 (lo) and not rt6i_idev dev index. Use the
> skb device ifindex instead. This fixes pinging to a local address from
> localhost source address.
>
> $ ping6 -I ::1 2001:1:1::2 -c 3
> PING 2001:1:1::2 (2001:1:1::2) from ::1 : 56 data bytes
> 64 bytes from 2001:1:1::2: icmp_seq=1 ttl=64 time=0.037 ms
> 64 bytes from 2001:1:1::2: icmp_seq=2 ttl=64 time=0.069 ms
> 64 bytes from 2001:1:1::2: icmp_seq=3 ttl=64 time=0.122 ms
>
> 2001:1:1::2 ping statistics
> 3 packets transmitted, 3 received, 0% packet loss, time 2032ms
> rtt min/avg/max/mdev = 0.037/0.076/0.122/0.035 ms
>
> Fixes: 1b70d792cf67 ("ipv6: Use rt6i_idev index for echo replies to a local address")
> Signed-off-by: Fernando Fernandez Mancera <fmancera@...e.de>
> ---
> v2: no changes
> v3: use ipv6_addr_loopback() as it is more efficient
> ---
> net/ipv6/icmp.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
Reviewed-by: David Ahern <dsahern@...nel.org>
Powered by blists - more mailing lists