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

Details

Provenance
melifaroAuthored on Feb 20 2023, 2:24 PM
Parents
rG0de03c306c2f: man9: Add an smr(9) manual page
Branches
Unknown
Tags
Unknown