Skip to content

fix(network): resolve LAN lobby discovery issues across POSIX platforms#201

Draft
fbraz3 wants to merge 2 commits into
mainfrom
fix/issue-86-lan-discovery-mac-linux
Draft

fix(network): resolve LAN lobby discovery issues across POSIX platforms#201
fbraz3 wants to merge 2 commits into
mainfrom
fix/issue-86-lan-discovery-mac-linux

Conversation

@fbraz3

@fbraz3 fbraz3 commented Jul 11, 2026

Copy link
Copy Markdown
Owner

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 to INADDR_ANY instead of m_localIP on 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.

fbraz3 added 2 commits July 11, 2026 12:25
- 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.
@fbraz3 fbraz3 force-pushed the fix/issue-86-lan-discovery-mac-linux branch from 0100477 to 997e20d Compare July 11, 2026 18:11
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.

LAN lobby discovery fails between Linux and macOS builds

1 participant