]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
netlink: use ifmedia to provide vlan interface operstate.
authorAlexander V. Chernikov <melifaro@FreeBSD.org>
Wed, 15 Feb 2023 20:22:47 +0000 (20:22 +0000)
committerAlexander V. Chernikov <melifaro@FreeBSD.org>
Wed, 15 Feb 2023 20:22:47 +0000 (20:22 +0000)
commit5dd48f718433959c283a8a4d6e46512426f1e200
tree876d14564510f6e3675d5f08612f6ffe32ba9615
parent5f044c4e055a387e4db5a899ea17705cc1a542e2
netlink: use ifmedia to provide vlan interface operstate.

Netlink customers rely on admin and operational state when
 working with interfaces. The current implementation retuns
 "unknown" operstate for all interface types except IFT_ETHER
 and IFT_LOOP.

This change updates the code to fetch vlan operstate in the same way
 as for the ether interfaces. For the rest of the interface types,
 operstate is now mapped to the admin state.

Reported by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
MFC after: 3 days
sys/netlink/route/iface.c