Skip to content

Fix UDP multicast interface on MacOS #1940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Dennis-Johnson
Copy link

@Dennis-Johnson Dennis-Johnson commented May 18, 2025

Hi,

This fixes #1760 to allow usage of the UDP Multicast backend on MacOS.

The ioctl check before timestamping in recv was only partially fixed for Windows on main, but MacOS still doesn't support this ioctl.

The second change is adding the SO_REUSEPORT option.

@Dennis-Johnson Dennis-Johnson changed the title Add sock option SO_REUSEPORT to allow udp multicast on macos Fix UDP multicast interface on MacOS May 18, 2025
@Dennis-Johnson
Copy link
Author

Also, the example provided in your docs fails with DEFAULT_GROUP_IPv6 on MacOS. These changes work with DEFAULT_GROUP_IPv4 though.

line 320, in _create_socket
    raise can.CanInitializationError(
can.exceptions.CanInitializationError: could not create or configure socket

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.

Issues with UdpMulticastBus and MacOS
1 participant