HomeFreeBSD

netlink: fix IPv6 route addition with link-local gateway

Description

netlink: fix IPv6 route addition with link-local gateway

Currently kernel assumes that IPv6 gateway address is in "embedded"
form - that is, for the link-local IPv6 addresses, interface index
is embedded in bytes 2 and 3 of the address.
Fix address embedding in netlink by wrapping nhop_set_gw() in the
netlink-specific nl_set_nexthop_gw(), which does such embedding
automatically.

Reported by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
MFC after: 3 days

(cherry picked from commit c7c348162101a70b1f99299578dabe1d3b100e48)

Details

Provenance
melifaroAuthored on Feb 20 2023, 2:24 PM
Parents
rG07595bd3c55a: testing: handling non-root users with VNETs in pytest-based tests.
Branches
Unknown
Tags
Unknown