halflife icon indicating copy to clipboard operation
halflife copied to clipboard

[HL25] Can't connect to the game server within the loopback network interface

Open Splatt581 opened this issue 3 months ago • 0 comments

If you turn off the network connection and start the server on the loopback network interface (127.0.0.1), the game client will not be able to connect to the server. This happens because the SVC_GetChallenge server function does not send a packet with challenge number for further client connection. Let's take a look at the code snippet we're interested in:

void SVC_GetChallenge()
{
...
v18 = Steam_GSGetSteamID();
    if ( NET_IsConfigured() && !Steam_GSSteamIDIsValidOrLAN(v18) )
      return;
...

With the anniversary update, new checks were added to the engine. The bug is an incorrect return in the Steam_GSSteamIDIsValidOrLAN function. The Steam_GSGetSteamID function without connecting to Steam servers returns "1" as SteamID.

Splatt581 avatar Apr 21 '24 17:04 Splatt581