fix(iroh-net): Fix in detecting globally routable IPv6 addresses #2030
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
We were incorrectly identifying globally routable IPv6 addresses as
not routable. This make netcheck skip IPv6 addresses.
Notes & open questions
Closes #2022
The fix in the netcheck, test is curious, it fails on this PR fairly
consistently yet it is really a flaky test introduced in combination with #2027.
Now that we have IPv6 resolving properly we might get an IPv6 result. Since
this test only has a single DerpUrl it only needs one result to complete.
This could be an IPv4 OR an IPv6 result, we don't know which one will be
faster. And if the other is slow enough then it won't be received. I think
this behaviour is fine, we simply can't guarantee that both must have a result
and the point of netcheck is to return something working quickly.
Change checklist