Spent the day implementing a subset of Happy Eyeballs Version 2 (RFC
8305, https://tools.ietf.org/html/rfc8305) for APT. I initially started
implementing a subset of its predecessor (RFC 6555,
https://tools.ietf.org/html/rfc6555) half a year ago and reworked that
today, but then I noticed the new RFC and switched to that.

The branch pu/happy-eyeballs2a
(https://github.com/Debian/apt/compare/master...julian-klode:pu/happy-
eyeballs2a?expand=1) implements it as following:

1. All addresses returned by getaddrinfo() are ordered so that preferred and 
non-prefered address families alternate (for example, IPv6, IPv4, IPv6, IPv4).
2. For each address, we attempt a connection and wait 250 ms for it and all 
previous attempts, storing all attempts in a list (vector currently). If one 
connection succeeds it is used.
3. If no connection succeeded, we wait another TimeOut for all attempts and use 
the result of that wait as the final result.

This means we easily fall back in cases of broken IPv6 routing, and also
in situations where some hosts just refuse connections.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1308200

Title:
  apt-get not RFC6555 (Happy Eyeballs) compliant

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1308200/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to