[Bug 10657] New: Regression: GetAdaptersInfo no longer returning hardware address.

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Dec 3 07:43:10 CST 2007


           Summary: Regression: GetAdaptersInfo no longer returning hardware
           Product: Wine
           Version: 0.9.50.
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: wine-net
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: gnb10 at gnb10.uklinux.net

GetAdaptersInfo is failing to return the MAC address of eth0, which breaks
the licence checking on a piece of software I'm using. A bit of debugging shows
that getInterfacePhysicalByIndex is being called with 'len' set to zero, while
the code in getInterfacePhysicalByName expects len to be initialised to the
available buffer space for holding the address.
 The change that caused it seems to have been the one in this commit:


which among other things removed the initialisation of the length passed in.
Certainly the trivial change

--- wine-0.9.50/dlls/iphlpapi/iphlpapi_main.c   2007-11-30 17:38:15.000000000
+++ wine-0.9.50.new/dlls/iphlpapi/iphlpapi_main.c       2007-12-03
13:41:12.000000000 +0000
@@ -735,6 +735,7 @@

               /* on Win98 this is left empty, but whatever */
               getInterfaceNameByIndex(table->indexes[ndx], ptr->AdapterName);
+              ptr->AddressLength = sizeof(ptr->Address);
                &ptr->AddressLength, ptr->Address, &ptr->Type);
               ptr->Index = table->indexes[ndx];

makes the application I'm using work again, but I'm not familiar enough with
wine internals to know whether this is the right place for it, or whether it
should already have been initialised elsewhere.

Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the wine-bugs mailing list