HomeFreeBSD

netinet6: store ND context directly in struct in6_ifextra

Description

netinet6: store ND context directly in struct in6_ifextra

Stop using struct nd_ifinfo for that, because it is an API struct for
SIOCGIFINFO_IN6. The functional changes are isolated to the protocol
attach and detach: in6_ifarrival(), nd6_ifattach(), in6_ifdeparture(),
nd6_ifdetach(), as well as to the nd6_ioctl(), nd6_ra_input(),
nd6_slowtimo() and in6_ifmtu().

The dad_failures member was just renamed to match the rest. The M_IP6NDP
malloc(9) type declaration moved to files that actually use it.

The rest of the changes are mechanical substitution of double pointer
dereference via ND_IFINFO() to a single pointer dereference. This was
achieved with a sed(1) script:

s/ND_IFINFO\(([a-z0-9>_.-]+)\)->(flags|linkmtu|basereachable|reachable|retrans|chlim)/\1->if_inet6->nd_\2/g
s/nd_chlim/nd_curhoplimit/g

Reviewed by: tuexen, madpilot
Differential Revision: https://reviews.freebsd.org/D54725

Details

Provenance
glebiusAuthored on Jan 23 2026, 10:17 PM
Reviewer
tuexen
Differential Revision
D54725: netinet6: store ND context directly in struct in6_ifextra
Parents
rG25a11d9805fc: netinet6: use in6_ifmtu() instead of IN6_LINKMTU() macro
Branches
Unknown
Tags
Unknown