From: Oliver Kurth Date: Fri, 26 Oct 2018 17:44:56 +0000 (-0700) Subject: Common source file change not directly applicable to open-vm-tools X-Git-Tag: stable-11.0.0~381 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19f930cf847b6113f9d0923b571d6e6bfc6db45f;p=thirdparty%2Fopen-vm-tools.git Common source file change not directly applicable to open-vm-tools On ESXi, AF_PACKET family is reported for vmk* interfaces only and its ifa_flags is reported as 0, so do not check for IFF_UP/IFF_LOOPBACK. --- diff --git a/open-vm-tools/lib/nicInfo/nicInfoPosix.c b/open-vm-tools/lib/nicInfo/nicInfoPosix.c index f95e980f2..708f4ad45 100644 --- a/open-vm-tools/lib/nicInfo/nicInfoPosix.c +++ b/open-vm-tools/lib/nicInfo/nicInfoPosix.c @@ -277,12 +277,21 @@ GuestInfoGetInterface(struct ifaddrs *ifaddrs, if (sll != NULL && sll->sll_family == AF_PACKET) { char macAddress[NICINFO_MAC_LEN]; + + /* + * PR 2193804: + * On ESXi, AF_PACKET family is reported for vmk* interfaces only + * and its ifa_flags is reported as 0. No AF_PACKET family ifaddrs + * is reported for loopback interface. + */ +#if !defined(USERWORLD) /* * Ignore loopback and downed devices. */ if (!(pkt->ifa_flags & IFF_UP) || pkt->ifa_flags & IFF_LOOPBACK) { continue; } +#endif Str_Sprintf(macAddress, sizeof macAddress, "%02x:%02x:%02x:%02x:%02x:%02x",