]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
netlink: fix IPv6 route addition with link-local gateway
authorAlexander V. Chernikov <melifaro@FreeBSD.org>
Mon, 20 Feb 2023 14:24:01 +0000 (14:24 +0000)
committerAlexander V. Chernikov <melifaro@FreeBSD.org>
Mon, 20 Feb 2023 14:29:48 +0000 (14:29 +0000)
commitc7c348162101a70b1f99299578dabe1d3b100e48
tree9be4f9a067c58c714c2d20959e868f675fbfcd86
parent0de03c306c2f95580e56c65b74ebf8c04c1416b3
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
sys/netlink/route/nexthop.c
sys/netlink/route/route_var.h
sys/netlink/route/rt.c