[Bug 56790] New: wine binds my application to "lo" adapter
https://bugs.winehq.org/show_bug.cgi?id=56790 Bug ID: 56790 Summary: wine binds my application to "lo" adapter Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winsock Assignee: wine-bugs(a)winehq.org Reporter: contact(a)msteinbusch.nl Distribution: ArchLinux Created attachment 76596 --> https://bugs.winehq.org/attachment.cgi?id=76596 A full wine trace Issue: Farming Simulator 2022 dedicated webserver binds application to "lo" adapter Wine doesn't run my program the same way as Windows does, for some reason it binds to the "lo" adapter. I suspect the application is selecting the first interface. Sadly there is no way to override this. I included a full trace, keywords to look trough are winsock, 127.0.0.1, winsock:bind socket etc. Any help is welcome and if more info is needed let me know. Wine: 9.10-1 and < Archlinux, Kernel 6.9.3. X68_64 A VNC instance where the issue can be reproduced is available on request. A license key for Farming Simulator 2022 can be provided by me on request. The download of the game/server can be found at: https://eshop.giants-software.com/downloads.php This docker container is using nginx to get around the issue: https://github.com/wine-gameservers/arch-wine-fs22 Screenshot and logs included in zip. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #1 from contact(a)msteinbusch.nl --- Created attachment 76597 --> https://bugs.winehq.org/attachment.cgi?id=76597 Screenshot of the issue. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=56790 contact(a)msteinbusch.nl changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|wine binds my application |wine binds |to "lo" adapter |dedicatedServer.exe to "lo" | |adapter -- 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.
https://bugs.winehq.org/show_bug.cgi?id=56790 contact(a)msteinbusch.nl changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |9.10 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=56790 Zeb Figura <z.figura12(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12(a)gmail.com --- Comment #2 from Zeb Figura <z.figura12(a)gmail.com> --- It uses GetAdaptersAddresses() apparently. I note that on at least one Windows machine the physical adapter is enumerated before the loopback, whereas here I see the loopback enumerated first. So there's some support for that hypothesis. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #3 from Zeb Figura <z.figura12(a)gmail.com> --- Looks like the sorting should probably be done at the nsi or nsiproxy level? -- 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.
https://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #4 from contact(a)msteinbusch.nl --- Would it be possible to get a wine patch that somehow flips the order? Sadly I don't have the skills to do it myself, but adding a patch and compiling wine is something I can do for sure. I have been tackling this issue for few years now and thousands of users of my images would be so happy if we can finally drop nginx. So far many thanks for the detailed examination of the log file. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=56790 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4(a)web.de -- 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.
https://bugs.winehq.org/show_bug.cgi?id=56790 Ken Sharp <imwellcushtymelike(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |imwellcushtymelike(a)gmail.co | |m -- 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.
https://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #5 from contact(a)msteinbusch.nl --- it's the same for the new Farming Simulator 2025 version, if someone likes to figure out if we can fix this please contact me I will provide a legit copy of the game for you. Discord: toetje583 github.com/toetje585 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #6 from Hans Leidekker <hans(a)meelstraat.net> --- Chances are that this is fixed with 72f11610cafb018fde8c56e05003c2448a314490. Can you test? -- 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.
https://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #7 from contact(a)msteinbusch.nl --- (In reply to Hans Leidekker from comment #6)
Chances are that this is fixed with 72f11610cafb018fde8c56e05003c2448a314490. Can you test?
I can confirm this somewhat fixed the issue. At one point, the server was binding itself to a Docker bridge ()172.22.x.x interface for some reason. However, after disabling Docker and testing again, it correctly bound to the intended interface, such as 192.2.1.200. This wasn’t possible before! I cleaned up unused docker networks rebooted with docker still enabled and it still binded to the correct interface. In my Docker setup, I only have two interfaces, so I’m confident it will work properly now. Unfortunately, I wasn’t able to test it within my Docker containers since I need to wait for the fix to become available in the ArchLinux repository. I'm exited to see this fixed! -- 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.
https://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #8 from Hans Leidekker <hans(a)meelstraat.net> --- (In reply to contact from comment #7)
(In reply to Hans Leidekker from comment #6)
Chances are that this is fixed with 72f11610cafb018fde8c56e05003c2448a314490. Can you test?
I can confirm this somewhat fixed the issue.
At one point, the server was binding itself to a Docker bridge ()172.22.x.x interface for some reason. However, after disabling Docker and testing again, it correctly bound to the intended interface, such as 192.2.1.200. This wasn’t possible before! I cleaned up unused docker networks rebooted with docker still enabled and it still binded to the correct interface.
That's why I said there's a chance that it works now. The game depends on which adapter is returned first, which depends on its route metric. This is not guaranteed to be the right one on Windows either. But at least the loopback adapter is no longer returned first on Wine. Let us know if we can close this bug. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #9 from contact(a)msteinbusch.nl --- (In reply to Hans Leidekker from comment #8)
(In reply to contact from comment #7)
(In reply to Hans Leidekker from comment #6)
Chances are that this is fixed with 72f11610cafb018fde8c56e05003c2448a314490. Can you test?
I can confirm this somewhat fixed the issue.
At one point, the server was binding itself to a Docker bridge ()172.22.x.x interface for some reason. However, after disabling Docker and testing again, it correctly bound to the intended interface, such as 192.2.1.200. This wasn’t possible before! I cleaned up unused docker networks rebooted with docker still enabled and it still binded to the correct interface.
That's why I said there's a chance that it works now. The game depends on which adapter is returned first, which depends on its route metric. This is not guaranteed to be the right one on Windows either. But at least the loopback adapter is no longer returned first on Wine.
Let us know if we can close this bug.
But if I'm right we can assign metrics to interfaces/routes so then you for sure can close this bug as resolved! -- 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.
https://bugs.winehq.org/show_bug.cgi?id=56790 Hans Leidekker <hans(a)meelstraat.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|winsock |iphlpapi Fixed by SHA1| |72f11610cafb018fde8c56e0500 | |3c2448a314490 Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #10 from Hans Leidekker <hans(a)meelstraat.net> --- Fixed with 72f11610cafb018fde8c56e05003c2448a314490. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=56790 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #11 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 9.22. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=56790 contact(a)msteinbusch.nl changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |UNCONFIRMED Version|9.10 |10.18 Resolution|FIXED |--- --- Comment #12 from contact(a)msteinbusch.nl --- After upgrading to wine 10.18 this issue is re-introduced. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #13 from Hans Leidekker <hans(a)meelstraat.net> --- What's the output of 'wine ipconfig' on your machine? -- 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.
http://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #14 from contact(a)msteinbusch.nl --- (In reply to Hans Leidekker from comment #13)
What's the output of 'wine ipconfig' on your machine?
for wine 10.1-1 Ethernet adaptor eth0 Connection-specific DNS suffix. . : . IPv4 address. . . . . . . . . . . : 172.18.0.2 Default gateway . . . . . . . . . : 172.18.0.1 Ethernet adaptor lo Connection-specific DNS suffix. . : . IPv6 address. . . . . . . . . . . : ::1 IPv4 address. . . . . . . . . . . : 127.0.0.1 Default gateway . . . . . . . . . : and then for wine 10.18 Ethernet adaptor lo Connection-specific DNS suffix. . : . IPv6 address. . . . . . . . . . . : ::1 IPv4 address. . . . . . . . . . . : 127.0.0.1 Default gateway . . . . . . . . . : Ethernet adaptor eth0 Connection-specific DNS suffix. . : . IPv4 address. . . . . . . . . . . : 172.18.0.2 Default gateway . . . . . . . . . : 172.18.0.1 If you need anything else let me know. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #15 from Hans Leidekker <hans(a)meelstraat.net> --- Not sure what could have caused the order to change. Would you be able to perform a regression test? https://gitlab.winehq.org/wine/wine/-/wikis/Regression-Testing -- 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.
http://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #16 from Hans Leidekker <hans(a)meelstraat.net> --- Created attachment 79735 --> http://bugs.winehq.org/attachment.cgi?id=79735 patch I'm guessing it's d48e8d03bd679480c24671908f1d2e4c0851bd65 that caused this. Can you try this patch? Please also attach the output of this command: $ cat /proc/net/route -- 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.
http://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #17 from contact(a)msteinbusch.nl --- (In reply to Hans Leidekker from comment #16)
Created attachment 79735 [details] patch
I'm guessing it's d48e8d03bd679480c24671908f1d2e4c0851bd65 that caused this. Can you try this patch?
Please also attach the output of this command:
$ cat /proc/net/route
Hello, I was not able to test the patch yet, however I can confirm that 10.14 is the latest version that does not have this bug. 10.14: Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT eth0 00000000 010012AC 0003 0 0 0 00000000 0 0 0 eth0 000012AC 00000000 0001 0 0 0 0000FFFF 0 0 0 -- 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.
http://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #18 from contact(a)msteinbusch.nl --- (In reply to contact from comment #17)
(In reply to Hans Leidekker from comment #16)
Created attachment 79735 [details] patch
I'm guessing it's d48e8d03bd679480c24671908f1d2e4c0851bd65 that caused this. Can you try this patch?
Please also attach the output of this command:
$ cat /proc/net/route
Hello,
I was not able to test the patch yet, however I can confirm that 10.14 is the latest version that does not have this bug.
10.16:
Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT eth0 00000000 010012AC 0003 0 0 0 00000000 0 0 0 eth0 000012AC 00000000 0001 0 0 0 0000FFFF 0 0 0
-- 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.
http://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #19 from Hans Leidekker <hans(a)meelstraat.net> --- (In reply to contact from comment #18)
I was not able to test the patch yet, however I can confirm that 10.14 is the latest version that does not have this bug.
That commit was introduced in 10.16 so I expect 10.15 to be the latest release that works. It could be something else too of course.
10.16:
Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT eth0 00000000 010012AC 0003 0 0 0 00000000 0 0 0 eth0 000012AC 00000000 0001 0 0 0 0000FFFF 0 0 0
It's interesting that the metric is 0. This is a container, right? -- 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.
http://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #20 from contact(a)msteinbusch.nl --- (In reply to Hans Leidekker from comment #19)
(In reply to contact from comment #18)
I was not able to test the patch yet, however I can confirm that 10.14 is the latest version that does not have this bug.
That commit was introduced in 10.16 so I expect 10.15 to be the latest release that works. It could be something else too of course.
10.16:
Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT eth0 00000000 010012AC 0003 0 0 0 00000000 0 0 0 eth0 000012AC 00000000 0001 0 0 0 0000FFFF 0 0 0
It's interesting that the metric is 0. This is a container, right?
Hello, Indeed sorry, 10.15 is the latest version that seems to be working just double checked. Archlinux luckly keeps package archives so i'm able to test it quickly. this was the output of 10.16, with both metrics on 0 not sure if you would like me to test the same in 10.15? -- 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.
http://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #21 from Hans Leidekker <hans(a)meelstraat.net> --- (In reply to contact from comment #20)
this was the output of 10.16, with both metrics on 0 not sure if you would like me to test the same in 10.15?
No, /proc/net/route is the Linux kernel's view of the route table which will be the same. Please run this test with 10.15 and 10.16 and attach the output here: https://testbot.winehq.org/GetFile.pl?JobKey=160877&StepKey=1 -- 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.
http://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #22 from contact(a)msteinbusch.nl --- Created attachment 79739 --> http://bugs.winehq.org/attachment.cgi?id=79739 iphlpapi_test.exe 10.15 -- 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.
http://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #23 from contact(a)msteinbusch.nl --- Created attachment 79740 --> http://bugs.winehq.org/attachment.cgi?id=79740 iphlpapi_test.exe 10.16 -- 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.
http://bugs.winehq.org/show_bug.cgi?id=56790 Hans Leidekker <hans(a)meelstraat.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |d48e8d03bd679480c24671908f1 | |d2e4c0851bd65 Keywords| |regression --- Comment #24 from Hans Leidekker <hans(a)meelstraat.net> --- Thanks, so it is a regression from d48e8d03bd679480c24671908f1d2e4c0851bd65. Before the loopback route had a metric of 4294967295, after it's 256. This makes it sort before the ethernet adapter which also gets 4294967295 on your machine, likely because it's a virtual (container) device. Running the iphlpapi test on the testbot shows that Windows consistently assigns a higher metric to the loopback adapter compared to ethernet adapters, so my proposal is to revert to the behavior before this commit and assign the highest possible value (4294967295). -- 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.
http://bugs.winehq.org/show_bug.cgi?id=56790 Hans Leidekker <hans(a)meelstraat.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #79735|0 |1 is obsolete| | --- Comment #25 from Hans Leidekker <hans(a)meelstraat.net> --- Created attachment 79744 --> http://bugs.winehq.org/attachment.cgi?id=79744 patch Can you try this patch? -- 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.
http://bugs.winehq.org/show_bug.cgi?id=56790 --- Comment #26 from contact(a)msteinbusch.nl --- (In reply to Hans Leidekker from comment #25)
Created attachment 79744 [details] patch
Can you try this patch?
Helll, Sorry for the delay I will try it this weekend. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=56790 pascal.eckert2003@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pascal.eckert2003@gmail.com --- Comment #27 from pascal.eckert2003@gmail.com --- (In reply to Hans Leidekker from comment #25)
Created attachment 79744 [details] patch
Can you try this patch?
Hello, tried this patch today with wine 11-rc2. I can confirm that the ports/ip's are now correctly assigned. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=56790 Hans Leidekker <hans@meelstraat.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #28 from Hans Leidekker <hans@meelstraat.net> --- Thanks for testing. This should be fixed with ff6d292b3f1944dbad741788d740118fa9416d6c. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=56790 Alexandre Julliard <julliard@winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #29 from Alexandre Julliard <julliard@winehq.org> --- Closing bugs fixed in 11.0-rc4. -- 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.
participants (3)
-
bugs@winehq.org -
WineHQ Bugzilla -
WineHQ Bugzilla