[PATCH net-next v2 0/2] ipv6: update NUD_FAILED neighbors from NA messages

Lawrence Lee posted 2 patches 1 week, 3 days ago
There is a newer version of this series
Documentation/networking/ip-sysctl.rst        |  28 ++--
include/net/ndisc.h                           |  15 ++-
net/6lowpan/ndisc.c                           |  15 ++-
net/ipv6/ndisc.c                              |  94 ++++++++-----
.../net/ndisc_unsolicited_na_test.sh          | 124 +++++++++++++++---
5 files changed, 201 insertions(+), 75 deletions(-)
[PATCH net-next v2 0/2] ipv6: update NUD_FAILED neighbors from NA messages
Posted by Lawrence Lee 1 week, 3 days ago
Neighbor Advertisements for existing NUD_FAILED entries are currently
ignored. This can leave a first-hop router with an unusable neighbor after
the host becomes reachable and announces itself, particularly when
forwarding is offloaded away from the kernel and traffic destined to the
FAILED neighbor is unable to trigger the kernel's normal neighbor
resolution process.
Allowing neighbor entries to be updated from NAs already received by the
kernel is preferable since it creates less work compared to periodically
probing FAILED neighbors (e.g. using NTF_EXT_MANAGED).

Extend accept_untracked_na to treat FAILED entries like absent entries.
Require a target link-layer address, IPv6 forwarding, and acceptance by the
sysctl, including its source-prefix check in mode 2. Recover the entry only
to STALE, including for solicited NAs, to maintain parity with handling of
non-existent neighbor cache entries.

Patch #1 implements the behavior and updates RFC 9131-related comments and
accept_untracked_na documentation.

Patch #2 extends ndisc_unsolicited_na_test.sh to cover FAILED-entry
recovery and each acceptance gate, including in-prefix and out-of-prefix
mode 2.

Thanks to Ido Schimmel for feedback on the original RFC.

---
v2:
- Full implementation of logic to update FAILED entries to STALE.
- Update the RFC 9131-related comments and sysctl documentation.
- Add selftests to verify state changes only when the accept_untracked_na
  setting is enabled.

v1 (RFC):
https://lore.kernel.org/r/20260813233344.445265-1-lfqlee314@gmail.com

Testing:
- x86_64 current-config and allyesconfig builds with W=1
- tools/testing/selftests/net/ndisc_unsolicited_na_test.sh: 14 passed
- Local NIPA checks: all substantive checks passed
- Sashiko local review completed

Lawrence Lee (2):
  ipv6: update NUD_FAILED neighbors from NA messages
  selftests: net: test untracked NA recovery of FAILED neighbors

 Documentation/networking/ip-sysctl.rst        |  28 ++--
 include/net/ndisc.h                           |  15 ++-
 net/6lowpan/ndisc.c                           |  15 ++-
 net/ipv6/ndisc.c                              |  94 ++++++++-----
 .../net/ndisc_unsolicited_na_test.sh          | 124 +++++++++++++++---
 5 files changed, 201 insertions(+), 75 deletions(-)


base-commit: 272a65db243bfa34b9277632830e0e06d7e3518e
-- 
2.43.0
Re: [PATCH net-next v2 0/2] ipv6: update NUD_FAILED neighbors from NA messages
Posted by Randy Dunlap 1 week, 3 days ago

On 9/14/26 10:01 PM, Lawrence Lee wrote:
> Testing:
> - x86_64 current-config and allyesconfig builds with W=1

What does current-config mean?

> - tools/testing/selftests/net/ndisc_unsolicited_na_test.sh: 14 passed
> - Local NIPA checks: all substantive checks passed
> - Sashiko local review completed

thanks.
-- 
~Randy
Re: [PATCH net-next v2 0/2] ipv6: update NUD_FAILED neighbors from NA messages
Posted by Lawrence Lee 1 week, 2 days ago
On Tue Sep 15, 2026 at 5:26 AM UTC, Randy Dunlap wrote:
>
>
> On 9/14/26 10:01 PM, Lawrence Lee wrote:
> > Testing:
> > - x86_64 current-config and allyesconfig builds with W=1
>
> What does current-config mean?
>
Accidentally forgot to reply-all when responding to Randy before, 
copying my original reply here:

That's referring to my local .config build options. It's essentially 
just the defconfig target but with VETH and Overlay FS enabled. Sorry 
for the confusion.