Opened 3 years ago
Closed 2 years ago
#13384 closed defect (invalid)
LAN: Wrong server IP address shown
Reported by: | xax | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | --Other-- |
Version: | Keywords: | ||
Cc: | Game: |
Description
On a Windows 10 (63 bit) system with a main net interface 192.168.99.11/24 (and no interface on 192.168.0.1/24) ScummVM's server functionality (GUI: Options » LAN » Server) shows 192.168.0.1 in the suggested connectable URL.
It should suggest 192.168.99.11 instead. (The server seems to bind to 0.0.0.0.)
Change History (4)
comment:1 by , 3 years ago
comment:2 by , 3 years ago
Keywords: | server ip bind LAN removed |
---|---|
Summary: | LAN»Server: Wrong server IP address shown → LAN: Wrong server IP address shown |
comment:3 by , 3 years ago
I can't replicate this issue on Linux x86_64 with the latest nightly build.
xax: I suspect that this issue is sensitive to your system networking setup as the code calls down to sdl_net to deal with this:
https://www.libsdl.org/projects/SDL_net/docs/SDL_net_16.html
https://www.libsdl.org/projects/SDL_net/docs/SDL_net_17.html#SEC17
It looks to try to get the local hostname and then resolve this back to an IP address, so exactly which interface gets bound on machines with several could be buggy...
The responsible code for this can be located at:
https://github.com/scummvm/scummvm/blob/master/backends/networking/sdl_net/localwebserver.cpp#L116
and
https://github.com/scummvm/scummvm/blob/master/backends/networking/sdl_net/localwebserver.cpp#L284