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>
Approved by: re(cperciva)
MFC after: 3 days

(cherry picked from commit 5dd48f718433959c283a8a4d6e46512426f1e200)
(cherry picked from commit c169fb625ee0800ad1e6046440d67eef598581c2)

Details

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