iphlpapi: Set 0.0.0.0 as the IP and mask of disconnected interfaces

Bruno Jesus 00cpxxx at gmail.com
Fri Jan 16 09:07:34 CST 2015


On Thu, Jan 15, 2015 at 10:13 AM, Bruno Jesus <00cpxxx at gmail.com> wrote:
> Superseeds 108610.
>
> In Windows if the eth cable is disconnected the interface returns
> 0.0.0.0, when it's connected and using DHCP but no DHCP server is
> found it returns an APIPA [1] address. In our case it's simpler to
> assume that an IP less interface is a disconnected interface.
>
> Fixes bug https://bugs.winehq.org/show_bug.cgi?id=32205
>
> [1] http://www.webopedia.com/TERM/A/APIPA.html

I see the patch is pending. In defense of the patch all I can do is
say that I manually tested this in different Windows versions by
disconnecting the interface (physical cable/wifi connection).

If there is a specific concern about it please tell me so I can look
for alternatives.

Windows 98 connected (ETH):
Adapter '', IP 172.16.204.135, Mask 255.255.255.0

Windows 98 disconnected (ETH):
Adapter '', IP 0.0.0.0, Mask 0.0.0.0

Windows XP connected (ETH):
Adapter '{02FB7145-66CB-4DF2-8975-BBCAC6044973}', IP 172.16.204.131,
Mask 255.255.255.0

Windows XP disconnected (ETH):
Adapter '{02FB7145-66CB-4DF2-8975-BBCAC6044973}', IP 0.0.0.0, Mask 0.0.0.0

Windows 8.1 connected (ETH):
Adapter '{8973E4B8-0C69-45E0-85D0-EF4A71D6BD87}', IP 10.100.200.60,
Mask 255.0.0.0

Windows 8.1 disconnected (ETH):
Adapter '{8973E4B8-0C69-45E0-85D0-EF4A71D6BD87}', IP 0.0.0.0, Mask 0.0.0.0

Windows 8.1 connected (WIFI):
Adapter '{1E13889D-F3CC-49BC-A750-FFBE451AC8E1}', IP 192.168.251.136,
Mask 255.255.255.0

Windows 8.1 disconnected (WIFI):
Adapter '{1E13889D-F3CC-49BC-A750-FFBE451AC8E1}', IP 0.0.0.0, Mask 0.0.0.0

Best Regards,
Bruno



More information about the wine-devel mailing list