[PR #11368] fix: bind auto-discovery to multicast ip on macOS #12866

Closed
opened 2026-02-07 07:03:07 +03:00 by OVERLORD · 0 comments
Owner

Original Pull Request: https://github.com/jellyfin/jellyfin/pull/11368

State: closed
Merged: Yes


Changes

This PR make the auto discovery bind to the multicast IP instead of the unicast IP on macOS like Linux. Unlike Linux, macOS does not require(and actually does not allow) bind to 255.255.255.255 to receive broadcast packets.

This PR also modified the responder IP of the auto-discovery. Instead of using the .255 multicast IP as the responder, use the explicit unicast IP that the server is listen on. This is because:

  • The machine may have multiple interfaces have an IP in the subnet, like one for Wi-Fi and one for wired. Set this to make the responder interface explicit instead of relying on the kernel behavior.
  • macOS prohibits sending to a unicast address with a UdpClient bind to a multicast address.

Issues

**Original Pull Request:** https://github.com/jellyfin/jellyfin/pull/11368 **State:** closed **Merged:** Yes --- <!-- Ensure your title is short, descriptive, and in the imperative mood (Fix X, Change Y, instead of Fixed X, Changed Y). For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our documentation. --> **Changes** <!-- Describe your changes here in 1-5 sentences. --> This PR make the auto discovery bind to the multicast IP instead of the unicast IP on macOS like Linux. Unlike Linux, macOS does not require(and actually does not allow) bind to 255.255.255.255 to receive broadcast packets. This PR also modified the responder IP of the auto-discovery. Instead of using the `.255` multicast IP as the responder, use the explicit unicast IP that the server is listen on. This is because: - The machine may have multiple interfaces have an IP in the subnet, like one for Wi-Fi and one for wired. Set this to make the responder interface explicit instead of relying on the kernel behavior. - macOS prohibits sending to a unicast address with a UdpClient bind to a multicast address. **Issues** <!-- Tag any issues that this PR solves here. ex. Fixes # -->
OVERLORD added the pull-request label 2026-02-07 07:03:07 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#12866