Skip to content

Fix /net_restart and IPv6 multicast bugs - #2002

Open
slipher wants to merge 6 commits into
DaemonEngine:masterfrom
slipher:ip6lan
Open

slipher wants to merge 6 commits into
DaemonEngine:masterfrom
slipher:ip6lan

Conversation

@slipher

@slipher slipher commented Sep 30, 2026

Copy link
Copy Markdown
Member
  • Fix the net_restart command on *nix. It has the same issue with leaking sockets into the NaCl process that Windows did.
  • Fix various bugs with IPv6 multicast (used for finding LAN servers).

Correctly set the IPV6_MULTICAST_IF option on the IP6 socket. This
option affects outgoing multicast packets. Those are used by the client
when searching for IPv6 LAN servers. The old code setting
IPV6_MULTICAST_IF was useless because it was in NET_JoinMulticast6()
which is only called when starting a server.
Avoid leaking socket fd's into gamelogic subprocesses, which causes a
'bind: address already in use' error upon /net_restart.

The same bug was fixed for Windows in
f70cf74.
Internet sources say you are supposed to bind to the all-zeroes address
if you want to receive multicast packets, not the multicast address.
Indeed, when tested on Windows the attempt to bind to a multicast
address produced an error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant