[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#636871: provide a command-line switch to prefer IPv6 or IPv4



Control: severity -1 wishlist
Control: tags -1 newcomer
Control: retitle -1 apt: implement "Happy Eyeballs" for methods and IPv4/6
Control: forcemerge -1 845041

On Sun, Nov 20, 2016 at 10:23:25AM +0000, Tim Small wrote:
> There are already system-wide mechanisms to change the default stack
> which is used (/etc/gai.conf), and apt has:
>
> -o Acquire::ForceIPv4

Indeed, the option exists already (but it is -o Acquire::ForceIPv4=1 ).

I don't think we should be "wasting" single-char options on a workaround
for a problem which (hopefully) is on rapid decline, so I consider that
part of the request(s) done, but:


> What might be better (and would be a useful addition) would be to add
> fast fallback ("Happy Eyeballs" RFC6555) support to apt, especially when
> run in interactive mode.  I'm not familiar with the code, but I believe

> that libcurl includes RFC6555 support, and since apt uses libcurl, it
> might be easy to turn this on (or it might not).

apt is using libcurl(-gnutls) only for HTTPS¹. We have our own
implementation for HTTP (and FTP and stuff) in methods/connect.cc.
An implementation would likely need to reshuffle the code there a bit as
it is split over multiple functions – but they are static with a central
entry point given the initial hostname (on which SRV lookup is performed
and stuff) and returning the open socket-fd [simplified, there are
various other things passed in and given back, but that is the idea],
so that should absolutely be doable if someone wants to work on
implementing it.

If someone wants to try feel free to contact us on deity@/#debian-apt!


Best regards

David Kalnischkies

¹ and it isn't clear if we do change to something else at some point as the
dependency chain of it is quite large and a sort-of blocker for a-t-https in
the default install set.

Attachment: signature.asc
Description: PGP signature


Reply to: