Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 0/9] RFC 6724 rule 5.5 support
@ 2026-07-14  9:40 David 'equinox' Lamparter
  2026-07-14  9:40 ` [PATCH net-next 1/9] net/ipv6: fix lookup for ::/0 (non-)subtree route David 'equinox' Lamparter
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: David 'equinox' Lamparter @ 2026-07-14  9:40 UTC (permalink / raw)
  To: Paolo Abeni, Jakub Kicinski, Ido Schimmel
  Cc: David Ahern, David S. Miller, Eric Dumazet, Simon Horman,
	Jonathan Corbet, Shuah Khan, Fernando Fernandez Mancera,
	Lorenzo Colitti, Maciej Żenczykowski, Patrick Rohr, netdev,
	linux-doc, linux-kselftest

Hi all,


this patchset implements RFC6724 rule 5.5.  For the unaquainted:

   Rule 5.5: Prefer addresses in a prefix advertised by the next-hop.
   If SA or SA's prefix is assigned by the selected next-hop that will
   be used to send to D and SB or SB's prefix is assigned by a different
   next-hop, then prefer SA.  Similarly, if SB or SB's prefix is
   assigned by the next-hop that will be used to send to D and SA or
   SA's prefix is assigned by a different next-hop, then prefer SB.

The way this is done is through IPv6 subtree routes.  If a router
advertises some prefix in its RA/PIOs, source specific subtree routes
should be created for the default route (and RIOs) installed as a result
of processing that RA.

This may initially sound like a weird way to do it, but for one RFC8028
requires the subtree routes anyway, and also I did try the more obvious
approaches (explicitly tracking it, putting it on the address, putting
it on the neighbor entry) and all of them break in some scenarios.

I've put together a selftest, there's also a rather hacky test suite
created for an IETF hackathon: https://github.com/eqvinox/rule5p5-tests
(it's not specific to this patchset.)  I've also been dogfooding these
patches on my personal devices for more than a year.

Rule 5.5 itself has extensive history at the IETF, including changing
from optional to mandatory in the recent 6724 update.  It is immensely
useful (really: required) to make multihoming, renumbering and failover
work.

@Jakub you had previously asked me to resubmit the "prep" patches since
it was at a poor time (cf. Fri, Jul 25, 2025 at 05:39:58PM -0700).
(I had tried submitting the preparation bits on its own.)

@Paolo you had looked at the lookup fix:
On Tue, Nov 11, 2025 at 11:13:30AM +0100, Paolo Abeni wrote:
> The patch LGTM, and I agree this should go via net-next, given that it's
> really a corner case and I could miss nasty side-effects.
>
> It looks like you have some testing scenario handy: it would be great to
> include it as a paired self-test; could you please add it?

Cheers,


equi (David)


P.S.: I also happen to be around at netdevconf in Rome, in case anyone
happens to see this and have questions.  Of course being at a conference
generally means not looking at random patch mails, so this is mostly
just in case you see the Subject lines or this cover letter.  Apologies,
it wasn't possible for me to submit this ahead of the conference.


diffstat:
 Documentation/networking/ipv6-addrsel.rst                |  75 ++++++++++++++++++++++++++++++++
 MAINTAINERS                                              |   1 +
 include/net/addrconf.h                                   |   4 ++
 include/net/ip6_route.h                                  |  26 ------------
 net/ipv6/Kconfig                                         |  18 ++++++--
 net/ipv6/addrconf.c                                      | 144 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 net/ipv6/ip6_fib.c                                       |   5 ++-
 net/ipv6/ip6_output.c                                    |  26 +++++++++---
 net/ipv6/route.c                                         |  16 +++++--
 tools/testing/selftests/net/Makefile                     |   1 +
 tools/testing/selftests/net/config                       |   1 +
 tools/testing/selftests/net/ipv6_saddr_rfc6724rule5p5.py | 231 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 12 files changed, 497 insertions(+), 51 deletions(-)


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-07-14 17:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-14  9:40 [PATCH net-next 0/9] RFC 6724 rule 5.5 support David 'equinox' Lamparter
2026-07-14  9:40 ` [PATCH net-next 1/9] net/ipv6: fix lookup for ::/0 (non-)subtree route David 'equinox' Lamparter
2026-07-14  9:40 ` [PATCH net-next 2/9] net/ipv6: flatten ip6_route_get_saddr David 'equinox' Lamparter
2026-07-14  9:40 ` [PATCH net-next 3/9] net/ipv6: create ipv6_fl_get_saddr David 'equinox' Lamparter
2026-07-14  9:40 ` [PATCH net-next 4/9] net/ipv6: use ipv6_fl_get_saddr in output David 'equinox' Lamparter
2026-07-14  9:40 ` [PATCH net-next 5/9] net/ipv6: drop ip6_route_get_saddr David 'equinox' Lamparter
2026-07-14  9:40 ` [PATCH net-next 6/9] net/ipv6: flip IPV6_SUBTREES default to Y David 'equinox' Lamparter
2026-07-14  9:40 ` [PATCH net-next 7/9] net/ipv6: support RFC6724 rule 5.5 via subtrees David 'equinox' Lamparter
2026-07-14  9:40 ` [PATCH net-next 8/9] selftests: net: RFC6724 rule 5.5 tests David 'equinox' Lamparter
2026-07-14  9:40 ` [PATCH net-next 9/9] net: document RFC6724 rule 5.5 implementation David 'equinox' Lamparter
2026-07-14 13:01   ` Jonathan Corbet
2026-07-14 17:16     ` David 'equinox' Lamparter
2026-07-14 17:31       ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox