]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Common source file change not directly applicable to open-vm-tools
authorOliver Kurth <okurth@vmware.com>
Fri, 26 Oct 2018 17:44:56 +0000 (10:44 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 26 Oct 2018 17:44:56 +0000 (10:44 -0700)
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.

open-vm-tools/lib/nicInfo/nicInfoPosix.c

index f95e980f2a8bc4fe4d05e5b745b611a04000f4b2..708f4ad4551415ec31a10395d38a1ec8a8731b81 100644 (file)
@@ -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",