]> 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>
Sat, 18 Feb 2023 11:56:39 +0000 (11:56 +0000)
commitc169fb625ee0800ad1e6046440d67eef598581c2
treeb73e3c8be380afe1f362dec2ac727ec50cd0bd02
parent8c60d469d3faa98f6b0e49173f16a8603c4c4654
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

(cherry picked from commit 5dd48f718433959c283a8a4d6e46512426f1e200)
sys/netlink/route/iface.c