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

(cherry picked from commit 5dd48f718433959c283a8a4d6e46512426f1e200)

Details

Provenance
melifaroAuthored on Feb 15 2023, 8:22 PM
Parents
rG8c60d469d3fa: netlink: fix if_allocdescr() malloc options argument.
Branches
Unknown
Tags
Unknown