[Bug 606980] New: getaddrinfo() returns duplicate addresses under AI_ADDRCONFIG
http://bugzilla.novell.com/show_bug.cgi?id=606980 http://bugzilla.novell.com/show_bug.cgi?id=606980#c0 Summary: getaddrinfo() returns duplicate addresses under AI_ADDRCONFIG Classification: openSUSE Product: openSUSE 11.2 Version: Final Platform: i686 OS/Version: openSUSE 11.2 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: matthias.andree@gmx.de QAContact: qa@suse.de Found By: --- Blocker: --- Created an attachment (id=363088) --> (http://bugzilla.novell.com/attachment.cgi?id=363088) demo code that shows the problem User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.3) Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3 Presume I have a computer that has no global IPv6 addresses, but a few IPv4 addresses. Applications using getaddrinfo() with hints.ai_flags = AI_ADDRCONFIG set will properly omit IPv6 addresses, HOWEVER they will return duplicate IPv4 addresses. Demonstration code attached. Without IPv6 addresses: # show setup $ grep -w localhost /etc/hosts 127.0.0.1 localhost ::1 localhost ipv6-localhost ipv6-loopback $ ip a d fe80::260:XXXX:XXXX:XXXX/64 dev eth0 # fill in your HWADDR $ ip a s | grep inet inet 127.0.0.1/8 brd 127.255.255.255 scope host lo inet 127.0.0.2/8 brd 127.255.255.255 scope host secondary lo inet6 ::1/128 scope host inet 192.168.0.1/24 brd 192.168.0.255 scope global eth0 # compile test case $ gcc -Wall -Wextra -pedantic -O -o libcbug-demo libcbug-demo.c # run test case $ ./libcbug-demo localhost echo Address 1: 127.0.0.1 Address 2: 127.0.0.1 (127.0.0.1 should be listed only once, Solaris 10 for instance achieves that) Now configure a fake IPv6 address (don't do this on hosts with real IPv6 connectivity, it suffices to use your real IPv6 address) and re-run the application: $ ip a a 2001::2001 dev eth0 # set up IPv6 $ ./libcbug-demo localhost echo Address 1: ::1 Address 2: 127.0.0.1 $ ip a d 2001::2001 dev eth0 # deconfigure bogus address (This is fine) Practical consequence: excessive connection retries by applications that possibly take a long time. This also affects Ubuntu 10.04 LTS on amd64, please consider forwarding upstream. Reproducible: Always Steps to Reproduce: see details Actual Results: Duplicate 127.0.0.1 address. Expected Results: 127.0.0.1 address listed once. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=606980 http://bugzilla.novell.com/show_bug.cgi?id=606980#c1 --- Comment #1 from Matthias Andree <matthias.andree@gmx.de> 2010-05-19 00:11:28 UTC --- Note that the tested machine (openSUSE) is not the same as the reporting (Ubuntu). Just my convenience of running Firefox on the stronger machine. Meaning: please disregard the User-Agent. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=606980 http://bugzilla.novell.com/show_bug.cgi?id=606980#c Marcus Meissner <meissner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |pbaudis@novell.com |ovo.novell.com | -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=606980 http://bugzilla.novell.com/show_bug.cgi?id=606980#c2 Petr Baudis <pbaudis@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #2 from Petr Baudis <pbaudis@novell.com> 2010-06-01 01:42:16 UTC --- Hmm, curious that you see this on Ubuntu too, since Debian Lenny does not seem to be suffering AFAICS. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=606980 http://bugzilla.novell.com/show_bug.cgi?id=606980#c3 --- Comment #3 from Matthias Andree <matthias.andree@gmx.de> 2010-06-01 08:17:48 UTC --- I am not surprised, Ubuntu (1) use eglibc (Embedded...), (2) have local changes that deliberately break automatic synching with Debian, (3) has changing policies across releases WRT what branch they synch to. 10.04LTS aka Lucid Lynx for instance was branched off an older Debian/testing. Nevermind that curiosity. This bug report is about openSUSE and Ubuntu has a separate report, https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/582585 - I'd suggested to forward upstream because it apparently wasn't SUSE-specific and hence possibly not related to local patches. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=606980 https://bugzilla.novell.com/show_bug.cgi?id=606980#c zj jia <zjjia@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |zjjia@novell.com AssignedTo|bnc-team-screening@forge.pr |matz@novell.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=606980 https://bugzilla.novell.com/show_bug.cgi?id=606980#c5 Michael Matz <matz@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |WONTFIX Severity|Normal |Critical --- Comment #5 from Michael Matz <matz@novell.com> 2011-07-07 12:27:10 UTC --- See https://bugzilla.redhat.com/show_bug.cgi?id=496300 where Ulrich decided that this behaviour is okay with him for localhost. I've verified that for DNS queries the answers are as expected, in particular that if there's no local ipv6 address, that there's only one answer for each ipv4 address of the host. So, this might be inconvenient, but should not lead to any further timeouts as localhost is supposed to be loopback and if loopback times out something more serious is broken --> WONTFIX. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=606980 https://bugzilla.novell.com/show_bug.cgi?id=606980#c6 Matthias Andree <matthias.andree@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WONTFIX | --- Comment #6 from Matthias Andree <matthias.andree@gmx.de> 2011-07-07 13:58:28 UTC --- <irony>Alright. Ulrich is God and his silence is sufficient to defend his unsubstantiated "should" clauses.</irony> Ulrich isn't deciding what's a bug or not. His "should" clauses are not backed by system documentation are just personal opinions, but irrelevant. The point is that we get an UNLISTED and UNWARRANTED IPv4 address in return. While the IPv4 duplicate 127.0.0.1 is not typically a practical problem, the whole discussion sidesteps the actual resolver bug, and that is that IPv6 /etc/hosts entries yield IPv4 results that should not be there -- whether that is a malfunction of the AI_ADDRCONFIG flag or whatnot, I don't care. Reopening. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=606980 https://bugzilla.novell.com/show_bug.cgi?id=606980#c7 Matthias Andree <matthias.andree@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P3 - Medium Severity|Critical |Major --- Comment #7 from Matthias Andree <matthias.andree@gmx.de> 2011-07-07 13:58:56 UTC --- demoting importance -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=606980 https://bugzilla.novell.com/show_bug.cgi?id=606980#c8 Michael Matz <matz@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |WONTFIX --- Comment #8 from Michael Matz <matz@novell.com> 2011-07-07 14:35:23 UTC --- So, what exactly are you complaining about? It seems not to be the duplicate returns of 127.0.0.1 . Is that correct? You seem to complain about getaddrinfo returning an unlisted ipv4 address from /etc/hosts. But you haven't shown this. 127.0.0.1 _is_ listed in your /etc/hosts; it's returned twice, okay, but that's no issue to you it seems. So, please file a bug report about what actually worries you, not what you think are symptoms of a suspected problem. Note that the double-return of 127.0.0.1 will remain WONTFIX, meaning I agree it's a deficiency but I decided to not do anything about it. Take it upstream yourself if you disagree. Now, if you can report a different bug, the one that actually worries you, matters may be different. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com