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

Experimental patch that enforces IPV4 #16

Merged
merged 3 commits into from
Feb 7, 2024

Conversation

ryanmcgrath
Copy link
Collaborator

This moves the core HTTP client into an external crate and implements a custom resolver to attempt to limit connections to IPV4 only.

The reasoning for the external crate: it simplifies debugging this and enables swapping out the underlying HTTP client adapter for any further debugging. I wouldn't necessarily consider this design complete and/or necessary, but this bug is tricky to reproduce and I'm not jumping over a bunch of files hunting down imports.

The reasoning for the bug: GCP appears to have some oddities with regards to IPV6 support, and if a device is configured to be IPV6-capable and a user does not have a DNS cache entry for the API, they may run into a randomly broken connection. I believe we never saw this with the curl connections that were in use on the C++ side as that implements a happy-eyeballs flow that attempts to find the "best" route and follow it accordingly. This patch just attempts to restrict things to ipv4 which we know works.

This patch is subject to further iterations as it may require vending a few debug builds to users to see if it works out.

This moves the core HTTP client into an external crate and implements a
custom resolver to attempt to limit connections to IPV4 only.

The reasoning for the external crate: it simplifies debugging this and
enables swapping out the underlying HTTP client adapter for any further
debugging. I wouldn't necessarily consider this design complete and/or
necessary, but this bug is tricky to reproduce and I'm not jumping over
a bunch of files hunting down imports.

The reasoning for the bug: GCP appears to have some oddities with
regards to IPV6 support, and if a device is configured to be
IPV6-capable and a user does not have a DNS cache entry for the API,
they may run into a randomly broken connection. I believe we never saw
this with the curl connections that were in use on the C++ side as that
implements a happy-eyeballs flow that attempts to find the "best" route
and follow it accordingly. This patch just attempts to restrict things
to ipv4 which we know works.

This patch is subject to further iterations as it may require vending a
few debug builds to users to see if it works out.
@NikhilNarayana NikhilNarayana merged commit 1e9fbf1 into project-slippi:main Feb 7, 2024
4 checks passed
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