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

Enable IPV6_V6ONLY flag to increase reliability of IPv4 service #2343

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

alexrsagen
Copy link

@alexrsagen alexrsagen commented Aug 14, 2024

This PR fixes #2342.

yhirose/cpp-httplib@b2203bb explicitly disables the IPV6_V6ONLY flag, making the IPv6 socket bind to both IPv4 and IPv6, leaving the IPv4 socket (or the IPv4 part of the IPv6 dual-stack socket?) unable to bind, as mentioned here.

ZeroTierOne explicitly binds to both IPv4 and IPv6, this is not valid while the IPV6_V6ONLY flag is disabled.

To resolve the issue, this PR makes ZeroTierOne not utilize a dual-stack IPv6 socket by explicitly enabling the IPV6_V6ONLY flag.

…service, as there are separate sockets for IPv4 and IPv6
@laduke
Copy link
Contributor

laduke commented Aug 15, 2024

Thanks for doing this. We'll have test it on every OS. It might take a while.

@alexrsagen
Copy link
Author

Hey @laduke, people are still experiencing issues (see zerotier/DesktopUI#51 (comment)) that could potentially be resolved by my PRs.

I'd recommend you guys look into getting this and zerotier/DesktopUI#61 merged. The changes are very small, but could have a big impact.

@CLAassistant
Copy link

CLAassistant commented Feb 13, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ alexrsagen
❌ adamierymenko
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

Unable to connect to the ZeroTierOne service HTTP API via IPv4
4 participants