Skip to content

Implement network scoped broadcasts using user-selected IP #2401

@tintinhamans

Description

@tintinhamans

Currently, broadcasts use 255.255.255.255 regardless of user IP selection. Update the network code so broadcasts are sent using the subnet's broadcast address for the user-selected IP/interface from the options menu. This will improve LAN discovery and reliability when multiple network adapters are present.

Tasks:

  • Send broadcasts to the subnet broadcast address for the selected interface, not 255.255.255.255.
  • Ensure incoming broadcast packets are only received on the user-selected interface/subnet (bind sockets to the chosen IP).
  • Gate this new behavior behind RETAIL_COMPATIBLE_NETWORKING to preserve legacy compatibility.
  • Tie broadcast addressing and receiving logic to the chosen network interface in options.
  • Update initialization and sending/receiving logic accordingly.

Example:

  • Selected IP: 192.168.0.50, Mask: 255.255.255.0
  • Broadcast = (IP & Mask) | ~Mask = 192.168.0.255

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementIs new feature or requestNetworkAnything related to network, servers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions