Bugzilla – Bug 556299
aria2 does not handle (the lack of) IPv6 properly
Last modified: 2016-04-15 10:32:40 UTC
Created attachment 328028 [details] Test setup, aria2c logs and output from tcpdump. User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4) Gecko/20091016 SUSE/3.5.4-1.1.2 Firefox/3.5.4 When IPv6 is disabled, aria2c still issues requests for AAAA-records. When these records go to a nameserver which does not support IPv6, aria2c quits with an error message saying that name resolution failed. As a result, dowloading packages through yast failed as well. See attachment for testresults. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Tatsuhiro, this might be interesting for you.
DNS lookup is done by getaddrinfo() system call which is provided by glibc. It turns out that getaddrinfo() does AAAA lookup even if ipv6 is disabled by kernel. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=470289
Passing this to glibc maintainer.
getaddrinfo() behaves exactly as specified - if you told it to look up IPv6 addresses even if IPv6 is disabled, it does exactly that. If you are unhappy with getaddrinfo() behaviour, you need to provide a testcase and show exactly what it does that you don't like.
OK, my understanding is that if I call getaddrinfo() with ai_family = AF_UNSPEC, getaddrinfo() returns ipv4/ipv6 addresses and this behavior is correct because I told it to do so, right? If we want to avoid AAAA record lookup, should we give ai_family = AF_INET to getaddrinfo() instead of disabling IPv6 in kernel?
Of course, if you never want AAAA records returned. To return addresses usable on given system, use AI_ADDRCONFIG.
Thank you for reply. Since aria2 1.7.0, it has --disable-ipv6 option. If it is enabled, aria2 requests only IPv4 addresses to getaddrinfo(). With this option, you can avoid IPv6 address lookup. I'll also consider AI_ADDRCONFIG in the future release.
Is it possible to get an upgrade of the aria2 package in openSUSE 11.2 to at least version 1.7.0?
*** Bug 558877 has been marked as a duplicate of this bug. ***
I see aria2-1.7.2 being available in obs://network:utilities. (http://download.opensuse.org/repositories/network:/utilities/openSUSE_11.2/) I don't know if a maintenance update for 11.2 is already pending. @Tatsuhiro: Do you think it is worth releasing aria2-1.7.2 as an update, or will there be a release using AI_ADDRCONFIG available soon? I'm asking because my understanding is that --disable-ipv6 won't help yast/zypper. Libzypp needs to be fixed first, to set this option IFF IPv6 is disabled and at least aria2 1.7.0 is used. While an aria2 version using AI_ADDRCONFIG would not require such a workaround.
Created attachment 333337 [details] Patch to make aria2c use AI_ADDRCONFIG I attached the patch to make aria2c use AI_ADDRCONFIG. Please test it. If it fixes the problem, I'll include this change in the next 1.7.3 release in this month.
It works for me. A patched aria2-1.7.2 is now running on my machine without trouble. Depending on whether ipv6 is enabled or disabled at boot time, I can see the AAAA-records being requested, or not. So this issue should be solved by shipping aria2-1.7.3(?) as soon as it's available.
I released aria2-1.8.0 which includes the AI_ADDRCONFIG patch.
Just tested aria2 v1.8.0 and it works fine now. Thanks.
@maintenance: aria2-1.8.0 is available at obs://network:utilities. Please consider asking the maintainer to release this as an online update for 11.2.
*** Bug 569564 has been marked as a duplicate of this bug. ***
Coolo/Pascal: Could someone please take this bug and drive an aria2 online update for 11.2?
Set correct NEEDINFO for openSUSE update request (>= 11.2) Version upgrade is against policy. I don't know if we should make a exception here. It contains a lot of bugfixes but also some feature. But +1 Do we also need an update for libzypp (see comment #10)?
as aria2 is integrated into the update stack I am reluctant to fix this with a version update... :/
I can't fix aria2 bugs
(In reply to comment #19) > > Do we also need an update for libzypp (see comment #10)? No. Tatsuhiros aria2-1.8 fixes the problem completely. This would not require any additional libzypp update. The new version is already available at http://download.opensuse.org/repositories/network:/utilities/openSUSE_11.2/. If we don't want to ship this as an official update, we can close this bug and encourage people to get the fix from /network:/utilities/openSUSE_11.2.
how far is aria2c integration? does zypp just call aria? (I think it does?) and if the public commandline interface did not change it might not be that risky.
Yes, we just call aria.
i would say we can try it. pascal also called for testers now. +1
The SWAMPID for this issue is 30953. Please submit the patch and patchinfo file using this ID. (https://swamp.suse.de/webswamp/wf/30953)
ok, we will test it ;-) Be so kind and submit a patchinfo. I hope we find tester for it ;-)
Pascal, could you jump in here as you know best about aria? The details are described at http://en.opensuse.org/Maintenance - thanks a lot!
In stock 11.2, I was bitten by this problem ... unable to use zypp because IPv6 does not work very well on our network. Upgrading to aria2-1.8.2-8.1 from network:utilities and booting with ipv6.disable=1 works for me. Yast2 and zypper work fine, no other problems seen. So positive feedback from me.
I already did the branch+update in home:pbleser:branches:openSUSE:11.2/aria2, as well as submitted SR 31955 Patchinfo: SUMMARY: Upgrade to aria2 1.8.2 to properly avoid IPv6 when disabled DESCRIPTION: The older version or aria2 that shipped with openSUSE 11.2 did not properly perform DNS lookups, which caused it to make IPv6 lookups even when IPv6 support was disabled. This is fixed in version 1.8.2. PACKAGE: aria2 We should wait for some more positive feedback though.
> Patchinfo: > > SUMMARY: Upgrade to aria2 1.8.2 to properly avoid IPv6 when disabled > DESCRIPTION: The older version or aria2 that shipped with openSUSE 11.2 did not > properly perform DNS lookups, which caused it to make IPv6 lookups even when > IPv6 support was disabled. This is fixed in version 1.8.2. > PACKAGE: aria2 > > We should wait for some more positive feedback though. I have installed aria 1.8.2 across 22 machines and it has fixed the annoying bug, for me at least. I have no issues to report.
(i submitted the patchinfo)
*** Bug 552013 has been marked as a duplicate of this bug. ***
Just installed 1.8.2 and it's working fine! Ipv6 disabled in Yast and by adding: net.ipv6.conf.all.disable_ipv6 = 1 in sysctl.conf Bye.
Also received positive feedback by email and on IRC. Looks stable enough for pushing an online updated.
rule of thumb is to wait 7 days after checkin. so probably release around 17th
Update released for: aria2, aria2-debuginfo, aria2-debugsource Products: openSUSE 11.2 (debug, i586, x86_64)
Released after positive feedback. Thanks for testing.
Closing as FIXED, as we've had only positive feedback and as the upgrade has been released in the update channel.
Sorry, meant _resolved_ as FIXED :)
This is an autogenerated message for OBS integration: This bug (556299) was mentioned in https://build.opensuse.org/request/show/31955 11.2:Test / aria2