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

IPv6 connection attempts made in an IPv4 only network #6019

Closed
gerryfrancis opened this issue Oct 3, 2024 · 4 comments
Closed

IPv6 connection attempts made in an IPv4 only network #6019

gerryfrancis opened this issue Oct 3, 2024 · 4 comments

Comments

@gerryfrancis
Copy link
Contributor

gerryfrancis commented Oct 3, 2024

  • Operating System (Linux/Mac/Windows/iOS/Android):
    Android 14.

  • Delta Chat Version:
    1.46.14 (nightly built 2024-09-27).

  • Expected behavior:
    Connection attempts are made to IPv4 only addresses in an IPv4 only network.

  • Actual behavior:
    Connection attempts are made to IPv4 and IPv6 addresses in a IPv4 only network, which may result in a connecting error in regard to IPv6.

  • Steps to reproduce the problem:
    No idea, but the device must be connected to an IPv4 only network.

  • Screenshots:
    N/A.

  • Logs:
    deltachat-log-20241003-112408_2.txt

@gerryfrancis gerryfrancis changed the title IPv6 connection attempts made in a IPv4 only network IPv6 connection attempts made in an IPv4 only network Oct 3, 2024
@gerryfrancis
Copy link
Contributor Author

FYI, LinkProperties can be used to determine the currently connected IP address(es) on an Android device, also after onLinkPropertiesChanged has been fired.

@link2xt
Copy link
Collaborator

link2xt commented Oct 4, 2024

Is this somehow visible to the user except in the logs? According to the log timestamps, it takes 2 milliseconds between an attempt start and receiving "Network is unreachable" error, so it seems the error is returned locally by the operating system and no real attempt to send IPv6 packets happens. So if this does not cause any real user-visible problems, I would rather keep it as is and not add more code trying to determine if we have IPv6 connectivity instead of just trying to connect.

@gerryfrancis
Copy link
Contributor Author

Is this somehow visible to the user except in the logs?

@link2xt It has not been visible to me, overall the whole connecting procedure may take longer than usual. I thought that too many failed attempts would trigger breaks/delays until the app is connected again. If you do not confirm/acknowledge, we may close here, of course.

@link2xt
Copy link
Collaborator

link2xt commented Oct 4, 2024

I thought that too many failed attempts would trigger breaks/delays until the app is connected again.

No, IPv6 connection attempts are done in parallel with IPv4 connection attempts since #5915, so IPv6 connection attempts do not slow down IPv4 even if they timeout instead of failing immediately.

Anyway, once #6024 is in, Delta Chat will stop reconnecting after each FCM notification (like in your log).

Closing this as I think it is not common to test for IPv6 connectivity before trying to connect. Looked a bit into hyper-util client implementation and some other places, don't think anyone does anything similar.

@link2xt link2xt closed this as not planned Won't fix, can't repro, duplicate, stale Oct 4, 2024
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

No branches or pull requests

2 participants