HomeFreeBSD

netlink: improve source ifa selection algorithm when adding routes.

Description

netlink: improve source ifa selection algorithm when adding routes.

Use route destination sockaddr when the gateway is eiter AF_LINK or
has the different family (IPv4 over IPv6). This change ensures
the nexthop IFA has the same family as the destination.

Reported by: Dmitriy Smirnov <fox@sage.su>
Tested by: Dmitriy Smirnov <fox@sage.su>
MFC after: 3 days

Details

Provenance
melifaroAuthored on Apr 9 2023, 1:30 PM
Parents
rG351e4592f64b: route: remove always-true expression
Branches
Unknown
Tags
Unknown