Skip to content

Fix mDNS address selection for devices with multiple network interfaces#50

Open
stanelie wants to merge 1 commit into
chris-ritsen:masterfrom
stanelie:fix/mdns-multi-interface-address-selection
Open

Fix mDNS address selection for devices with multiple network interfaces#50
stanelie wants to merge 1 commit into
chris-ritsen:masterfrom
stanelie:fix/mdns-multi-interface-address-selection

Conversation

@stanelie
Copy link
Copy Markdown

@stanelie stanelie commented Apr 4, 2026

Summary

  • When a device advertises multiple IP addresses via mDNS (e.g. Dante VIA running on a macOS host with several network interfaces), addresses[0] could resolve to the wrong interface's IP.
  • Adds a _pick_address() helper in browser.py that, when --interface is configured, selects the advertised address on the matching subnet instead.
  • Falls back to addresses[0] when no interface is configured or only one address is advertised, preserving existing behaviour.

Test plan

  • Run netaudio device list without --interface — behaviour unchanged for single-interface devices
  • Run netaudio --interface <iface> device list on a network with a Dante VIA host that has multiple interfaces — verify the reported IP matches the interface subnet and agrees with Dante Controller

🤖 Generated with Claude Code

When a device advertises multiple IP addresses via mDNS (e.g. Dante VIA
running on a host with several interfaces), always picking addresses[0]
could return an address on the wrong interface.  Use the configured
--interface IP to select the address on the matching subnet instead,
falling back to addresses[0] when no interface is configured or only one
address is advertised.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant