ws2_32: Use the routing table information for gethostbyname('self') if the magic IP would otherwise be returned.

Erich Hoover ehoover at mines.edu
Fri Oct 9 17:49:53 CDT 2009


Real Name:
    Erich Hoover
Description:
    If an application calls gethostbyname on it's own hostname then it
expects an IP to be returned for each interface, in order of the
routing priority (see MS Knowledge Base article #160215).  The
attached patch first checks to see if the gethostbyname request
resolved to a loopback address (which currently gets replaced by the
magic IP).  If the magic IP would have been returned then it uses the
routing table to build the list of IP addresses and properly sorts
those addresses from highest routing priority to lowest routing
priority (lowest metric to highest metric).
Changelog:
    ws2_32: Use the routing table information for
gethostbyname('self') if the magic IP would otherwise be returned.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ws2_32-Use-the-routing-table-information-for-gethos.patch
Type: text/x-patch
Size: 7571 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20091009/4c1d2bac/attachment.bin>


More information about the wine-patches mailing list