HomeFreeBSD

netlink: use ifmedia to provide vlan interface operstate.

Description

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

Details

Provenance
melifaroAuthored on Feb 15 2023, 8:22 PM
Parents
rG5f044c4e055a: profil(2): profil(II) was in the v3 sources
Branches
Unknown
Tags
Unknown