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 IPv4 preference support #93

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

martinreichart
Copy link

In our tests with Austrian time servers we often see that using IPv6 addresses results in much slower query times (consistently 10 seconds instead of ~4 with only IPv4).

This PR adds a new parameter to the Clock.sync call and NTPClient to allow the preference of IPv4 addresses if both IPv4 and IPv6 addresses are resolved.

Adds an option to prefer IPv4 addresses for querying if both IPv4 and IPv6 addresses are resolved.

Signed-off-by: Martin Fitzka-Reichart <[email protected]>
@Reflejo
Copy link
Contributor

Reflejo commented Aug 15, 2022

Sorry for the delay, not a big fan of this. The way this is usually implemented (happy eye balls, etc) is to prioritize one over the other but not shut down one category. One solution could be to sort the dns results by preferred category and pick the result of the first N successful ones, regardless if they are ipv4 or 6.

could have a [.preferIPv6, .preferIPv4, .auto] sort of setting

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