fix(network): resolve LAN lobby discovery issues across POSIX platforms#201
Draft
fbraz3 wants to merge 2 commits into
Draft
fix(network): resolve LAN lobby discovery issues across POSIX platforms#201fbraz3 wants to merge 2 commits into
fbraz3 wants to merge 2 commits into
Conversation
- Filter out virtual, loopback, point-to-point, and non-broadcast interfaces in IPEnumeration. - Bind the LAN lobby UDP listener to INADDR_ANY on POSIX to reliably receive broadcasts. - Update UDP transport initialization logs for transparency on bound endpoints. Fixes #86
- Change DEBUG_LOG to active fprintf(stderr) in network and LAN menu files. - Ensure LANAPI::SetLocalIP also binds to INADDR_ANY on POSIX, keeping it consistent with lobby initialization. - Document console debug logging convention in AGENTS.md.
0100477 to
997e20d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #86
This pull request addresses the LAN lobby discovery issues across POSIX platforms (Linux and macOS) where host machines and clients were not visible to each other in the game list.
Changes
IPEnumeration.cpp: Filter out point-to-point, non-broadcast, and virtual network interfaces (e.g.docker,veth,virbr,awdl,llw,utun) on non-Windows platforms. This ensures the physical LAN interface is preferred and auto-selected.LANAPI.cpp: Bind the LAN lobby UDP transport socket toINADDR_ANYinstead ofm_localIPon POSIX. This allows the lobby listener to successfully catch incoming broadcasts on all interfaces.Transport.cpp: Add improved logging statements to trace socket binding results.