HomeFreeBSD

netinet6: factor out cached route lookups from selectroute().

Description

netinet6: factor out cached route lookups from selectroute().

Currently selectroute() contains two nearly-identical versions of
the route lookup logic - one for original destination and another
for the case when IPV6_NEXTHOP option was set on the socket.

Factor out handling these route lookups in a separation function to
improve readability.
This change also fixes handling of link-local IPV6_NEXTHOPs.

Differential Revision: https://reviews.freebsd.org/D35710
MFC after: 2 weeks

(cherry picked from commit 81a235ecde893a666e3cfac503068d9ea1bb013c)

Details

Provenance
melifaroAuthored on Jul 4 2022, 3:56 PM
Differential Revision
D35710: netinet6: factor out cached route lookups from selectroute().
Parents
rG98886bf1e811: netinet6: add ip6_output() scope tests
Branches
Unknown
Tags
Unknown