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@winehq.org Reporter: contact@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.
https://bugs.winehq.org/show_bug.cgi?id=56790
--- Comment #1 from contact@msteinbusch.nl --- Created attachment 76597 --> https://bugs.winehq.org/attachment.cgi?id=76597 Screenshot of the issue.
https://bugs.winehq.org/show_bug.cgi?id=56790
contact@msteinbusch.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|wine binds my application |wine binds |to "lo" adapter |dedicatedServer.exe to "lo" | |adapter
https://bugs.winehq.org/show_bug.cgi?id=56790
contact@msteinbusch.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |9.10
https://bugs.winehq.org/show_bug.cgi?id=56790
Zeb Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #2 from Zeb Figura z.figura12@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.
https://bugs.winehq.org/show_bug.cgi?id=56790
--- Comment #3 from Zeb Figura z.figura12@gmail.com --- Looks like the sorting should probably be done at the nsi or nsiproxy level?
https://bugs.winehq.org/show_bug.cgi?id=56790
--- Comment #4 from contact@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.
https://bugs.winehq.org/show_bug.cgi?id=56790
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
https://bugs.winehq.org/show_bug.cgi?id=56790
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |imwellcushtymelike@gmail.co | |m
https://bugs.winehq.org/show_bug.cgi?id=56790
--- Comment #5 from contact@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
https://bugs.winehq.org/show_bug.cgi?id=56790
--- Comment #6 from Hans Leidekker hans@meelstraat.net --- Chances are that this is fixed with 72f11610cafb018fde8c56e05003c2448a314490. Can you test?
https://bugs.winehq.org/show_bug.cgi?id=56790
--- Comment #7 from contact@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!
https://bugs.winehq.org/show_bug.cgi?id=56790
--- Comment #8 from Hans Leidekker hans@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.
https://bugs.winehq.org/show_bug.cgi?id=56790
--- Comment #9 from contact@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!
https://bugs.winehq.org/show_bug.cgi?id=56790
Hans Leidekker hans@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@meelstraat.net --- Fixed with 72f11610cafb018fde8c56e05003c2448a314490.
https://bugs.winehq.org/show_bug.cgi?id=56790
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #11 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.22.