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
Approved by: re(cperciva)

(cherry picked from commit c7c348162101a70b1f99299578dabe1d3b100e48)
(cherry picked from commit 240ee0183fa190502a5e1f163c49f336f8f10cd4)

Details

Provenance
melifaroAuthored on Feb 20 2023, 2:24 PM
Parents
rG1780bdba96d3: vm_fault: Fix a race in vm_fault_soft_fast()
Branches
Unknown
Tags
Unknown