http://bugs.winehq.org/show_bug.cgi?id=15711
Summary: GetHostName and GetHostByName Product: Wine Version: 1.1.6 Platform: PC URL: http://home.scarlet.be/linux/compteco/test4.zip OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 AssignedTo: wine-bugs@winehq.org ReportedBy: vincent.hardy.be@gmail.com
Created an attachment (id=16791) --> (http://bugs.winehq.org/attachment.cgi?id=16791) Screenshot on Windows XP
GetHostName and GetHostByName should not return LocalHost and 127.0.0.1 but name and IP of the box. See screenshots and test program with sources.
http://bugs.winehq.org/show_bug.cgi?id=15711
--- Comment #1 from Vincent Hardy vincent.hardy.be@gmail.com 2008-10-22 05:10:20 --- Created an attachment (id=16792) --> (http://bugs.winehq.org/attachment.cgi?id=16792) screenshot with wine
http://bugs.winehq.org/show_bug.cgi?id=15711
Vincent Hardy vincent.hardy.be@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
http://bugs.winehq.org/show_bug.cgi?id=15711
--- Comment #2 from Vincent Hardy vincent.hardy.be@gmail.com 2008-10-22 05:50:36 --- Created an attachment (id=16795) --> (http://bugs.winehq.org/attachment.cgi?id=16795) screenshot 2 with wine
With linux Hostname other than "LocalHost" : IP is wrong
http://bugs.winehq.org/show_bug.cgi?id=15711
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |testcase
http://bugs.winehq.org/show_bug.cgi?id=15711
Jaime Rave jaimerave@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jaimerave@gmail.com
--- Comment #3 from Jaime Rave jaimerave@gmail.com 2008-10-22 12:04:59 --- Check this: http://wiki.winehq.org/FAQ#head-0344b4325219c69636aeffeaa3596d6855283afd
http://bugs.winehq.org/show_bug.cgi?id=15711
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |WONTFIX
--- Comment #4 from Vitaliy Margolen vitaliy@kievinfo.com 2008-10-22 20:20:40 --- Edit your /etc/hosts file to not assign 127.0.0.1 to your hostname.
We been here before this is a won't fix. The bug is in system configuration. Everything that could have been fixed in Wine is fixed.
http://bugs.winehq.org/show_bug.cgi?id=15711
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Vitaliy Margolen vitaliy@kievinfo.com 2008-10-22 20:20:47 --- Closing.
http://bugs.winehq.org/show_bug.cgi?id=15711
Erich Hoover ehoover@mines.edu changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ehoover@mines.edu
--- Comment #6 from Erich Hoover ehoover@mines.edu 2009-09-28 19:21:23 --- (In reply to comment #4)
Edit your /etc/hosts file to not assign 127.0.0.1 to your hostname.
We been here before this is a won't fix. The bug is in system configuration. Everything that could have been fixed in Wine is fixed.
I've been looking into this issue (from a usability perspective it affects some other things I'm working on), and it can be fixed without forcing users to continually edit their /etc/hosts file. First, a knowledge base article on how they intended this "feature" to work: http://support.microsoft.com/kb/160215
As a result of reading that article a light-bulb went off for me, this command is intended to return all the addressable IPs (or in unix parlance, the IP associated with each unique route) in order from highest to lowest priority. So, after digging through RTNETLINK a bit I was able to create a small example application that does this (obtains each unique route and gets the associated IP, though RTNETLINK reports routes from lowest priority to highest). I believe that this is a legitimate route to obtain the behavior desired by Windows without forcing users to edit their /etc/hosts file every time their IP changes. If this sounds acceptable then I can whip up a patch that will do this if Wine would otherwise have reverted to the "magic IP."
http://bugs.winehq.org/show_bug.cgi?id=15711
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dolcevita@supereva.it
--- Comment #7 from Vitaliy Margolen vitaliy@kievinfo.com 2009-10-01 08:33:30 --- *** Bug 20229 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=15711
--- Comment #8 from Erich Hoover ehoover@mines.edu 2009-10-01 18:44:24 --- Created an attachment (id=23874) --> (http://bugs.winehq.org/attachment.cgi?id=23874) Use the routing table if the local hostname returns the magic IP
Apparently this is a lot easier than I thought, Wine already uses the routing table information to build the list of adapters (this is nice because each Unix OS has a unique method of obtaining the routing table). Attached is a patch that uses the routing table for determining the IPs if gethostbyname("myself") returns the magic IP.
http://bugs.winehq.org/show_bug.cgi?id=15711
--- Comment #9 from Vincent Hardy vincent.hardy.be@gmail.com 2009-10-05 08:55:45 --- It works very well for me.
I think it's much more "windows compliant" with Erich's patch.
Why not submit this patch to wine-patch mailing-list ?
http://bugs.winehq.org/show_bug.cgi?id=15711
Erich Hoover ehoover@mines.edu changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #23874|0 |1 is obsolete| |
--- Comment #10 from Erich Hoover ehoover@mines.edu 2009-10-05 09:13:45 --- Created an attachment (id=23940) --> (http://bugs.winehq.org/attachment.cgi?id=23940) Use the routing table if the local hostname returns the magic IP [v2]
(In reply to comment #9)
It works very well for me.
I think it's much more "windows compliant" with Erich's patch.
Why not submit this patch to wine-patch mailing-list ?
It doesn't actually work right, Wine actually sorts the routing table information when it builds the interface list (so it does not maintain the priority present in the system's routing table). However, Wine does store the needed "priority" information (retrievable with GetIpForwardTable) and I've made up a new version that properly uses this information, but I'm not done testing it. If you'd like to try it I've attached it here.
http://bugs.winehq.org/show_bug.cgi?id=15711
--- Comment #11 from Vincent Hardy vincent.hardy.be@gmail.com 2009-10-06 07:40:32 --- Hi Erich, I've tested your new patch. It works also very well.
http://bugs.winehq.org/show_bug.cgi?id=15711
--- Comment #12 from Erich Hoover ehoover@mines.edu 2009-10-09 17:54:19 --- (In reply to comment #11)
Hi Erich, I've tested your new patch. It works also very well.
Great, we'll see if it takes: http://www.winehq.org/pipermail/wine-patches/2009-October/079729.html
http://bugs.winehq.org/show_bug.cgi?id=15711
--- Comment #13 from Erich Hoover ehoover@mines.edu 2009-12-10 11:32:05 --- (In reply to comment #12)
(In reply to comment #11)
Hi Erich, I've tested your new patch. It works also very well.
Great, we'll see if it takes: http://www.winehq.org/pipermail/wine-patches/2009-October/079729.html
An updated version of this patch has been committed to the latest git. Please test and let me know if you run into any problems.
http://bugs.winehq.org/show_bug.cgi?id=15711
--- Comment #14 from Vincent Hardy vincent.hardy.be@gmail.com 2009-12-11 06:56:08 --- I've tried current git : it works. Wonderful!
http://bugs.winehq.org/show_bug.cgi?id=15711
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |RESOLVED Component|kernel32 |winsock Resolution|WONTFIX |FIXED
--- Comment #15 from Nikolay Sivov bunglehead@gmail.com 2009-12-11 07:01:53 --- (In reply to comment #14)
I've tried current git : it works. Wonderful!
Fixed then.
http://bugs.winehq.org/show_bug.cgi?id=15711
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #16 from Alexandre Julliard julliard@winehq.org 2009-12-18 13:07:20 --- Closing bugs fixed in 1.1.35.
http://bugs.winehq.org/show_bug.cgi?id=15711
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |355818ae1e1222bffab7d014a95 | |2e4f70e3623d0