There's a strange behaviour of WinAPI function GetIfTable() since Windows Vista on some environments (ex, LBFO Teaming in Windows Server 2012 R2 etc).
The fuction usually returns a network adapter name (or friendly name, user-setted name) as MIB_IFROW.bDescr (ex, Ethernet). But sometime (on certain environments) it returns an adapter driver name (ex, "Microsoft Network Adapter Multiplexor Driver #2") instead friendly name. But there isn't problem if it use MIB_IF_ROW2.Alias.
An user can set a friendly name by renaming the network adapter to "LAN" or "Team" etc. But user cannot rename and renumber an adapter driver name.
I suggest to change the zbx_ifrow_get_utf8_description() function for using MIB_IF_ROW2.Alias instead MIB_IF_ROW2.Description.
I've attached two net.if.discovery - original with MIB_IF_ROW2.Description (discovery.orig.txt) and patched with MIB_IF_ROW2.Alias (discovery.txt).
- causes
-
ZBXNEXT-5286 Additional element {#IFALIAS} to net.if.discovery on Win32
- Open