Skip to content
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

Add support for network interfaces in mDNS configuration #3159

Closed

Conversation

cpeliciari
Copy link
Contributor

This commit addresses an issue encountered on Android devices when using the [zeroconf] package, which results in the following error:

[zeroconf] no suitable IPv4 interface: udp4: failed to join any of these interfaces: []

The root cause of this issue is that the zeroconf package fails to properly detect network interfaces on Android. To resolve this, I have implementation with anet, which includes a fix specifically targeting Android compatibility.

Additionally, a similar issue exists in the package github.com/multiformats/go-multiaddr, where it fails to handle network interfaces correctly on Android. I worked around this issue with the following commit:

8491a6c56a51cc4dec517388f4f044d939896984

@MarcoPolo
Copy link
Collaborator

For the same reasons that multiformats/go-multiaddr#255 is open, we don't want to use the anet package here.

A preferred change would be to add an option to provide a custom .Interfaces() method. User's can then use anet to implement that method.

@MarcoPolo
Copy link
Collaborator

A similar solution would be welcome in go-multiaddr btw.

@cpeliciari cpeliciari closed this Jan 29, 2025
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.

2 participants