[Bug 33152] New: GetAdaptersAddresses reports incorrect address family for IPv4 addresses

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Mar 8 18:51:44 CST 2013


http://bugs.winehq.org/show_bug.cgi?id=33152

             Bug #: 33152
           Summary: GetAdaptersAddresses reports incorrect address family
                    for IPv4 addresses
           Product: Wine
           Version: 1.5.25
          Platform: x86
        OS/Version: Mac OS X
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: iphlpapi
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: filip.navara at gmail.com
    Classification: Unclassified


Created attachment 43859
  --> http://bugs.winehq.org/attachment.cgi?id=43859
Test program

The GetAdaptersAddresses API reports incorrect address family for IPv4 unicast
addresses on OS X. I suspect it may be a memory corruption or some aliasing bug
in the compiler or the source code.

Attached test program is modified sample from MSDN
(http://msdn.microsoft.com/en-us/library/windows/desktop/aa365915(v=vs.85).aspx)
that prints the address family value for unicast addresses.

For IPv6 addresses the address family is correctly reported as 23, for IPv4 it
should be 2, but the actual reported value is pretty random (most commonly
512).

Log from the test program:

    Length of the IP_ADAPTER_ADDRESS struct: 368
    IfIndex (IPv4 interface): 1
    Adapter name: lo0
        Address length: 16
        Address family: 512
        Address length: 28
        Address family: 23
        Address length: 28
        Address family: 23
    Number of Unicast Addresses: 3

This also breaks .NET programs that use the NetworkInterface class. Tested on
Wine 1.5.25 and Crossover 12.1.2.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list