From: David Ahern <dsahern@kernel.org>
To: Fernando Fernandez Mancera <fmancera@suse.de>, netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org, shuah@kernel.org,
linux-kselftest@vger.kernel.org, haleyb.dev@gmail.com
Subject: Re: [PATCH 1/2 net-next v3] ipv6: use the right ifindex when replying to icmpv6 from localhost
Date: Fri, 23 Jan 2026 11:13:26 -0700 [thread overview]
Message-ID: <a918d777-36e7-4904-beaf-954455a29e92@kernel.org> (raw)
In-Reply-To: <20260121194409.6749-1-fmancera@suse.de>
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@suse.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@kernel.org>
next prev parent reply other threads:[~2026-01-23 18:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-21 19:44 [PATCH 1/2 net-next v3] ipv6: use the right ifindex when replying to icmpv6 from localhost Fernando Fernandez Mancera
2026-01-21 19:44 ` [PATCH 2/2 net-next v3] selftests: net: add ipv6 ping to local address " Fernando Fernandez Mancera
2026-01-23 18:13 ` David Ahern
2026-01-23 18:13 ` David Ahern [this message]
2026-01-25 21:50 ` [PATCH 1/2 net-next v3] ipv6: use the right ifindex when replying to icmpv6 " patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a918d777-36e7-4904-beaf-954455a29e92@kernel.org \
--to=dsahern@kernel.org \
--cc=davem@davemloft.net \
--cc=fmancera@suse.de \
--cc=haleyb.dev@gmail.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox