Page MenuHomeFreeBSD

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

Authored by zlei on Tue, Mar 4, 7:02 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 4, 9:54 PM
Unknown Object (File)
Tue, Mar 4, 7:13 PM

Details

Reviewers
melifaro
glebius
Group Reviewers
network
Summary
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.

Fixes:  7e5bf68495cc netlink: add netlink support
MFC after:      3 days
tests/netlink: Assert the route scope of interfaces's addresses

While here, add IPv4 link-local address to cover RT_SCOPE_LINK case.

MFC after:      3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped