]> 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>
Fri, 24 Feb 2023 10:43:50 +0000 (10:43 +0000)
commit240ee0183fa190502a5e1f163c49f336f8f10cd4
tree891c984ed0179c3c9f772114f42f4669c4408831
parent07595bd3c55a1c63ca49d7e250346a90910c206d
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)
sys/netlink/route/nexthop.c
sys/netlink/route/route_var.h
sys/netlink/route/rt.c