HomeFreeBSD

netlink: Fix getting route scope of interface's IPv4 addresses

Description

netlink: Fix getting route scope of interface's IPv4 addresses

sin_addr of a struct sockaddr_in is stored in network byte order, but
IN_LOOPBACK() and IN_LINKLOCAL() want the host order.

Reviewed by: melifaro, network
Fixes: 7e5bf68495cc netlink: add netlink support
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D49226

(cherry picked from commit 0e096bb3fcaaf663df372aa4abb986e8d63c6e68)
(cherry picked from commit 057165012b4d190a8efef83b465d3bbd10a43e28)

Details

Provenance
zleiAuthored on Fri, Mar 7, 4:14 AM
Reviewer
network
Differential Revision
D49226: netlink: Fix getting route scope of interface's IPv4 addresses
Parents
rG9f26a03fdbdc: tests/netlink: Assert the route scope of interface's addresses
Branches
Unknown
Tags
Unknown