LAN game issue, possibly LAN broadcast addresses interference

Questions about Wine on Linux
Locked
User avatar
slowpokefarm
Level 2
Level 2
Posts: 14
Joined: Thu Jul 28, 2022 5:59 am

LAN game issue, possibly LAN broadcast addresses interference

Post by slowpokefarm »

Hello!
I've encountered a weird LAN game behavior yesterday which I will try to describe here.

1. Setup.
We have 3 windows machines and a few more ubuntu machines with a game running under wine. They are connected into a local area network via wireless and wired connections within single network. I also was able to reproduce the issue on Macbook with latest available Wineskin.

2. Software.
We have encountered the issue on multiple games of Faces of War/Men of War series, I suppose they have the same netcode. Wine version is

Code: Select all

wine-5.0
.
Winetricks installed are basic

Code: Select all

d3dx9
,

Code: Select all

d3dcompiler_42
and

Code: Select all

directplay
with the latter not being necessary and installed in attempt to fix the lan play.

3. The issue.
Windows machines are seen ok in the lobby, while linux machines seem to broadcast themselves with the same IP causing them to be merged into one player in the lobby and causing network issues. Every wine game assumes the nickname of the latest connected wine player and they all seem to be acting on behalf of that player in the lobby, i.e. status, chat messages etc. Total player count in the lobby always equals the number of windows players plus 1 for all wine players combined. One linux machine can play with windows machines well, but as soon as we add another wine player the interference occurs.

4. The Ultimate Goal.
I want to be able to play via LAN using both windows and linux machines together without issues. I have googled through every clue I could and finally decided to write here.

I am not sure what debug logs would be useful here so I need an advice on that also.

UPD:

I have tried to start up a game from a linux pc and a windows player can see the correct IP in the server list. Now I have no idea where to dig further.
User avatar
slowpokefarm
Level 2
Level 2
Posts: 14
Joined: Thu Jul 28, 2022 5:59 am

Re: LAN game issue, possibly LAN broadcast addresses interference

Post by slowpokefarm »

It seems that the visible difference between the Windows network configuration and wine machines is that the ipconfig /all shows a loopback interface as the first available ethernet for wine machines.

There's a chance that such an old game engine is using primary MAC address to identify players on the lobby which in this case might be zeroes for the loopback interface. I have no evidence for that though since the debug options for those game are limited and the engine source is closed. I suspect that the issue is limited to certain software only.

Somehow I managed to exclude one linux machine from the issue until system restart. Couldn't reproduce it yet but I think it's related to the fact I have plugged in an external Wi-Fi adapter and then removed it.
User avatar
slowpokefarm
Level 2
Level 2
Posts: 14
Joined: Thu Jul 28, 2022 5:59 am

Re: LAN game issue, possibly LAN broadcast addresses interference

Post by slowpokefarm »

Added a wine debug output WINEDEBUG=+winsock,+netbios,+iphlpapi:

https://gist.github.com/slowpokefarm/79 ... cb6f4d38c6

There are two logs from two machines interfering with each other.
Locked