Local network multiplayer game doesnt listen on IPv4

Do you need help? Ask here!

Bug reporting belongs here: http://developer.wz2100.net/newticket
Post Reply
zomane
New user
Posts: 2
Joined: 12 Apr 2010, 22:30

Local network multiplayer game doesnt listen on IPv4

Post by zomane »

I've googled it and searched here too but no luck.
I want to host a multiplayer game in my local network but I can't because the game doesn't bind on IPv4 only on IPv6.
I disabled IPv6 in my internal network but still no luck. I don't need/want UPnP because even if it worked on my router I'm behind double NAT so the router first router will block the request and I anyways want to host a LAN-party i.e. there is no need server to be reachable from the outside world and to be advertised by the lobby server
I simply want to host a game and others in my local network to connect per IP to my box
Thank you in advance
pastdue
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 339
Joined: 13 Aug 2017, 17:44

Re: Local network multiplayer game doesnt listen on IPv4

Post by pastdue »

What OS are you running WZ on?

Run the game while specifying the command-line option:
--debug=net

Click on "Options" in the main menu, and then click the small "Open Configuration Directory" link in the bottom-left. Keep this window to the configuration directory open.

Then start hosting a game, wait about 10 seconds, then quit WZ.

And then find the latest log .txt in the <config dir>/logs folder, and attach it here or on a new GitHub issue.
zomane
New user
Posts: 2
Joined: 12 Apr 2010, 22:30

Re: Local network multiplayer game doesnt listen on IPv4

Post by zomane »

Thanks for the help.
I've opened a bug https://github.com/Warzone2100/warzone2100/issues/2881

The game is installed from snap because the version in my distro is pretty old.

Code: Select all

Operating System: Debian GNU/Linux 11 (bullseye)
Kernel: Linux 5.10.0-18-amd64
Architecture: x86-64

Warzone 2100 - Version: 4.2.7, Built: 2022-03-07
Looking at the log I see that the game itself closes the IPv4 socket

Code: Select all

[socketListen:1417] Successfully enabled IPv4 to IPv6 mapping. Cleaning up IPv4 socket.
Can I somehow override this behavior? I don't see any option that can force IPv4 only

Debugged a bit more. Disabled again IPv6 on the host and the client
So from the client I see that the game is listening on the host

Code: Select all

 nc -vzn 192.168.192.168 2100
Connection to 192.168.192.168 2100 port [tcp/*] succeeded!
But the client says "error while joining"
And this is what I see in the client log

Code: Select all

net     |10:42:18: [NETjoinGame:4417] Trying to join [192.168.192.168]:2100 ...
net     |10:42:18: [socketOpen:1223] Connecting to [192.168.192.168]:2100
net     |10:42:18: [socketOpen:1255] setting socket (0x557bccd25ae0) blocking status (false).
net     |10:42:18: [setSocketBlocking:905] Socket is set to non-blocking.
net     |10:42:18: [NETjoinGame:4449] Created socket_set 0x557bccd2cb30
net     |10:42:18: [SocketSet_AddSocket:818] Socket added: set->fds[0] = 0x557bccd25ae0
error   |10:42:18: [NETjoinGame:4474] Received error 5
net     |10:42:18: [SocketSet_DelSocket:829] Socket 0x557bccd25ae0 erased (set->fds[0])
What Received error 5 is ?

Looks like the error might be on my end(what a surprise :D)

The hosts says

Code: Select all

Sat Oct 15 10:46:26 2022 # Incoming connection from:192.168.192.33 	: 0 	(Sync)

==> WZlog-1015_103238.txt <==
error   |10:46:26: [NETallowJoining:3761] Received an invalid version "16384.68".

==> netplay-20221015_103537.log <==
Sat Oct 15 10:46:26 2022 # Invalid game version 	: 0 	(Sync)

==> WZlog-1015_103238.txt <==
net     |10:46:26: [NETallowJoining:3791] freeing temp socket 0x56103568aa90 (3791)
net     |10:46:26: [SocketSet_DelSocket:829] Socket 0x56103568aa90 erased (set->fds[0])
Client version is

Code: Select all

Warzone 2100 - Version: 4.2.3, Built: 2021-12-12

Code: Select all

Operating System: Ubuntu 22.04.1 LTS
          Kernel: Linux 5.15.0-48-generic
    Architecture: x86-64

Installed the snap version and it WORKED :yahoo:
thank you guys
Post Reply