]> 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>
Mon, 20 Feb 2023 19:48:26 +0000 (19:48 +0000)
commit94eb891ce9f58b650a6a0219a2c7d55ed7fb358b
treee9291677b76b0c3d4d6b9c33c3937396d871afd5
parent816aebf69c3dfabef3e9d7fca799438fcd5760ad
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>
Approved by:    re(cperciva)
MFC after: 3 days

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