Re: [PATCH net-next 1/2] net: ipv6: add strict RFC 4861 6.3.6 default router selection
From: Florian Fainelli
Date: Fri Dec 04 2026 - 15:54:21 EST
On 12/3/26 20:27, netdev-bot+sashiko@xxxxxxxxxx wrote:
Thank you for your contribution! Sashiko AI review found 9 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 4 · Low: 5
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] The commit message, the block comment over
rt6_strict_router_select() and the sysctl documentation all say strict…
Right, the wording was wrong. Strict mode ranks a router without a neighbour entry below a reachable one whatever its preference, which is the opposite of the "assume reachable" rule that 3630d40067a2 implements from RFC 4191. v2 describes the mode as RFC 4861 host behaviour with the
RFC 4191 reachability assumption turned off, in all three places.
- [Medium] The commit message says that with probing suppressed,
"unreachable routers are recovered through round-robin and traffic-…
Agreed, and the commit message claim was inaccurate: round-robin and traffic-driven resolution only recover routers while no router is reachable. v2 states that a router which is unreachable while another one is valid carries no traffic and is not solicited, and is used again
once it sends an RA with a Source Link-Layer Address option or an NS.
It si correct that probing it would be harmless while a valid router exists, since INCOMPLETE ranks below VALID. v2 keeps probing suppressed
unconditionally to keep the mode simple, and documents the consequence
rather than hiding it. When no router is valid, a probe would put the
probed router in INCOMPLETE, which outranks the round-robin candidates
and defeats rule 2, which is why it cannot simply be left on.
- [Medium] In strict mode, rt6_score_route() returns RT6_NUD_FAIL_DO_RR
(-1) for any gateway nexthop whose neighbour is missing, NUD_NONE or…
The mode is meant for netns whose routers are learned from RAs, which are never ECMP siblings. For legacy multipath routes, v2 documents the
behaviour in the commit message and in ip-sysctl.rst: a sibling whose score is negative (unresolved or failed) is skipped, and otherwise the
flow hash decides, so neither the ranking of INCOMPLETE below VALID nor
the router preference applies among siblings. Nexthop objects keep their existing ipv6_good_nh() behaviour.
- [Medium] The strict reachability rank (0x100 for INCOMPLETE, 0x200 for
VALID) is only added in rt6_score_route() for routes with a gateway…
Same answer: the ranking applies to routes with a gateway and gateway-
less routes are not ranked, so they lose to any gateway that is reachable or being resolved. This is now stated in the sysctl documentation and in the commit message instead of being implied.
- [Low] RFC 4861 6.3.6 rule 1 puts routers in INCOMPLETE state and
routers with no Neighbor Cache entry in the same "unknown or suspect"…
- [Low] The in-tree documentation and code comment describe value 0 as
"upstream default router selection" (Documentation/networking/ip-…
- [Low] The sysctl is documented as "strict default router selection" for
a CPE learning default routers from RAs on its WAN, but the code is…
- [Low] The block comment above rt6_strict_router_select() says that
ranking NUD_INCOMPLETE routers above DO_RR keeps selection on the…
- [Low] ip6_rt_strict_router_select is read with READ_ONCE() several
times during a single route lookup: once in ip6_pol_route() to decide…
- the documentation and comment no longer call value 0 "upstream behaviour", they describe what it does
- the scope (every route with a gateway, not only default routes) and the INCOMPLETE rank (a departure from rule 1, and no rotation while such a router exists) are documented, and the "round-robin" sentence now says "none known reachable and none being resolved"
- the comment no longer claims a guarantee under concurrent lookups
- the sysctl is sampled once in ip6_pol_route() and passed down as RT6_LOOKUP_F_STRICT_RTR, which also drops the per-candidate dev_net() lookups and the rt6_probe() early return.
pw-bot: cr
--
Florian