From: "Lawrence Lee" <lfqlee314@gmail.com>
To: <netdev-bot+sashiko@kernel.org>
Cc: <dsahern@kernel.org>, <idosch@nvidia.com>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<horms@kernel.org>, <rdunlap@infradead.org>,
<netdev@vger.kernel.org>, <aajith@arista.com>, <roopa@nvidia.com>,
<jhpark1013@gmail.com>, <corbet@lwn.net>,
<skhan@linuxfoundation.org>, <shuah@kernel.org>,
<linux-doc@vger.kernel.org>, <linux-kselftest@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <alex.aring@gmail.com>,
<linux-wpan@vger.kernel.org>, <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH net-next v2 1/2] ipv6: update NUD_FAILED neighbors from NA messages
Date: Thu, 17 Sep 2026 20:26:39 +0000 [thread overview]
Message-ID: <DLHVH7E0GSI7.EEUHJ5ZOUYIM@gmail.com> (raw)
In-Reply-To: <178966456087.22033.11671220306303617581@kernel.org>
On Thu Sep 17, 2026 at 5:02 PM UTC, wrote:
> > diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
> > index 90cd5d8525698..84d70c09205a2 100644
> > --- a/net/ipv6/ndisc.c
> > +++ b/net/ipv6/ndisc.c
>
> [ ... ]
>
> > @@ -972,14 +982,18 @@ static enum skb_drop_reason ndisc_recv_ns(struct sk_buff *skb)
> >
> > static int accept_untracked_na(struct inet6_dev *idev, struct in6_addr *saddr)
> > {
> > + /* For any given neighbor IP address, consider it an untracked neighbor if
> > + * it is absent from the neighbor cache or if it has a NUD_FAILED entry in
> > + * the neighbor cache
> > + */
> ^^^^
>
> [Severity: Low]
> This isn't a bug, but this comment block in accept_untracked_na() is
> indented with spaces while the switch statement right below it uses tabs,
> so checkpatch reports "ERROR: code indent should use tabs where possible".
>
> The comment also describes what the caller considers "untracked", based on
> the neighbour cache, but accept_untracked_na() only reads the sysctl value
> and never sees the neighbour entry. Would it fit better next to
>
> neigh_untracked = !neigh || neigh_failed;
>
> in ndisc_recv_na(), where the RFC 9131 decision table already documents the
> same concept?
This comment will be removed as per maintainer feedback.
> [Severity: Low]
> Is the new FAILED handling covered by an in-tree test at this point in the
> series? As of this commit, ndisc_unsolicited_na_test.sh and
> arp_ndisc_untracked_subnets.sh only seed absent entries, so the whole
> FAILED to STALE half of the knob, including the mode 2 same-subnet
> qualification, would still pass if it were broken.
>
> For the record, this looks resolved later in the same series: the follow-up
> patch "selftests: net: test untracked NA recovery of FAILED neighbors"
> (7be3b5fcfd3f9adb7489aff8013c6d4beacbf20c) seeds entries with
>
> ip neigh replace ... nud failed extern_learn
>
> and adds the failed combinations covering every row of the new table,
> including the in-prefix and out-of-prefix mode 2 cases. Mentioning it here
> only for completeness.
>
The tests are added in the next patch of this series
> [Severity: Medium]
> Why does the gateway address handed to rt6_clean_tohost() now depend on the
> previous NUD state of the entry? Before this patch the same "router to
> host" event always flushed routes keyed by saddr.
>
> fib6_clean_tohost() in net/ipv6/route.c matches the argument against the
> gateway of RA-installed routes and against cached exceptions:
>
> if (((rt->fib6_flags & RTF_RA_ROUTER) == RTF_RA_ROUTER) &&
> nh->fib_nh_gw_family && ipv6_addr_equal(gateway, &nh->fib_nh_gw6))
> return -1;
>
> so it expects the address of the node that stopped being a router, which is
> unrelated to whether the cache entry happened to be in NUD_FAILED.
>
> When saddr differs from msg->target, and that is allowed since RFC 4861 4.4
> only requires the NA source to be an address of the sending interface (a
> router advertising a global target from its link-local source, or the proxy
> NA case handled a few lines above via pneigh_lookup()), the FAILED recovery
> path flushes routes keyed by msg->target while every other path flushes
> routes keyed by saddr. Can both be right for the identical event?
>
> If saddr was the wrong key all along, would it make sense to fix that
> separately for all cases, with a Fixes: tag, rather than changing it only
> for the FAILED path? The changelog describes only the FAILED to STALE
> transition and does not mention this change of key.
This change will be removed in the next version of the series as
discussed in another thread:
https://lore.kernel.org/all/DLHV5GF21AY4.3GAK241ZI2UR8@gmail.com/
next prev parent reply other threads:[~2026-09-17 20:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 5:01 [PATCH net-next v2 0/2] " Lawrence Lee
2026-09-15 5:01 ` [PATCH net-next v2 1/2] " Lawrence Lee
2026-09-16 12:02 ` Ido Schimmel
2026-09-16 17:43 ` Lawrence Lee
2026-09-17 14:37 ` Ido Schimmel
2026-09-17 20:11 ` Lawrence Lee
2026-09-17 17:02 ` netdev-bot+sashiko
2026-09-17 20:26 ` Lawrence Lee [this message]
2026-09-15 5:01 ` [PATCH net-next v2 2/2] selftests: net: test untracked NA recovery of FAILED neighbors Lawrence Lee
2026-09-17 17:02 ` netdev-bot+sashiko
2026-09-18 5:52 ` Lawrence Lee
2026-09-15 5:26 ` [PATCH net-next v2 0/2] ipv6: update NUD_FAILED neighbors from NA messages Randy Dunlap
2026-09-15 15:54 ` Lawrence Lee
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=DLHVH7E0GSI7.EEUHJ5ZOUYIM@gmail.com \
--to=lfqlee314@gmail.com \
--cc=aajith@arista.com \
--cc=alex.aring@gmail.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=jhpark1013@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.org \
--cc=roopa@nvidia.com \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.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
all inboxes | Powered by JetHome®