public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/5507] New: gai() sorting is broken
@ 2007-12-18 9:26 madcoder at debian dot org
2007-12-18 9:27 ` [Bug libc/5507] " madcoder at debian dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: madcoder at debian dot org @ 2007-12-18 9:26 UTC (permalink / raw)
To: glibc-bugs
$ getent ahosts ftp.fi.debian.org.
130.230.54.99 DGRAM ftp.fi.debian.org
130.230.54.99 RAW
2001:708:310:54::99 STREAM
2001:708:310:54::99 DGRAM
2001:708:310:54::99 RAW
130.230.54.99 STREAM
The 3 INET6 addresses should come first, followed by the INET ones.
This worked with a 2.6.1 libc.
--
Summary: gai() sorting is broken
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: madcoder at debian dot org
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=5507
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libc/5507] gai() sorting is broken
2007-12-18 9:26 [Bug libc/5507] New: gai() sorting is broken madcoder at debian dot org
@ 2007-12-18 9:27 ` madcoder at debian dot org
2007-12-18 15:12 ` drepper at redhat dot com
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: madcoder at debian dot org @ 2007-12-18 9:27 UTC (permalink / raw)
To: glibc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |debian-glibc at lists dot
| |debian dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=5507
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libc/5507] gai() sorting is broken
2007-12-18 9:26 [Bug libc/5507] New: gai() sorting is broken madcoder at debian dot org
2007-12-18 9:27 ` [Bug libc/5507] " madcoder at debian dot org
@ 2007-12-18 15:12 ` drepper at redhat dot com
2007-12-18 16:35 ` madcoder at debian dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: drepper at redhat dot com @ 2007-12-18 15:12 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper at redhat dot com 2007-12-18 15:12 -------
I cannot reproduce this. Work fine for me:
$ getent ahosts ftp.fi.debian.org
2001:708:310:54::99 STREAM ftp.fi.debian.org
2001:708:310:54::99 DGRAM
2001:708:310:54::99 RAW
130.230.54.99 STREAM
130.230.54.99 DGRAM
130.230.54.99 RAW
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME
http://sourceware.org/bugzilla/show_bug.cgi?id=5507
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libc/5507] gai() sorting is broken
2007-12-18 9:26 [Bug libc/5507] New: gai() sorting is broken madcoder at debian dot org
2007-12-18 9:27 ` [Bug libc/5507] " madcoder at debian dot org
2007-12-18 15:12 ` drepper at redhat dot com
@ 2007-12-18 16:35 ` madcoder at debian dot org
2007-12-18 17:05 ` aurelien at aurel32 dot net
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: madcoder at debian dot org @ 2007-12-18 16:35 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From madcoder at debian dot org 2007-12-18 16:35 -------
Well, I'd be glad if you tried to interact with people before closing bugs.
$ host olympe.madism.org; host pan.madism.org
olympe.madism.org has address 82.243.245.108
pan.madism.org has address 88.191.52.104
pan.madism.org has IPv6 address 2002:58bf:3468::1
olympe also has ipv6 address 2a01:5d8:52f3:f56c:20f:eaff:fe66:7aad
on olympe I can see:
$ getent ahosts ftp.fi.debian.org.
2001:708:310:54::99 STREAM ftp.fi.debian.org
2001:708:310:54::99 DGRAM
2001:708:310:54::99 RAW
130.230.54.99 DGRAM
130.230.54.99 RAW
130.230.54.99 STREAM
$ getent ahosts liszt.debian.org.
2001:41b8:0:1003:213:21ff:fe20:1426 STREAM liszt.debian.org
2001:41b8:0:1003:213:21ff:fe20:1426 DGRAM
2001:41b8:0:1003:213:21ff:fe20:1426 RAW
82.195.75.100 DGRAM
82.195.75.100 RAW
82.195.75.100 STREAM
$ getent ahosts pan.madism.org.
88.191.52.104 DGRAM pan.madism.org
88.191.52.104 RAW
2002:58bf:3468::1 STREAM
2002:58bf:3468::1 DGRAM
2002:58bf:3468::1 RAW
88.191.52.104 STREAM
$ getent ahosts www.corsac.net
81.57.48.219 RAW www.corsac.net
81.57.48.219 DGRAM
2002:5139:30db::2 STREAM
2002:5139:30db::2 DGRAM
2002:5139:30db::2 RAW
81.57.48.219 STREAM
I don't know what makes the last ones special, /etc/hosts has no information
about pan.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|WORKSFORME |
http://sourceware.org/bugzilla/show_bug.cgi?id=5507
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libc/5507] gai() sorting is broken
2007-12-18 9:26 [Bug libc/5507] New: gai() sorting is broken madcoder at debian dot org
` (2 preceding siblings ...)
2007-12-18 16:35 ` madcoder at debian dot org
@ 2007-12-18 17:05 ` aurelien at aurel32 dot net
2007-12-18 17:57 ` ismail at pardus dot org dot tr
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: aurelien at aurel32 dot net @ 2007-12-18 17:05 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From aurelien at aurel32 dot net 2007-12-18 17:05 -------
Additional information:
# getent ahosts ftp.fi.debian.org
130.230.54.99 STREAM ftp.fi.debian.org
130.230.54.99 DGRAM
130.230.54.99 RAW
2001:708:310:54::99 STREAM
2001:708:310:54::99 DGRAM
2001:708:310:54::99 RAW
# ip addr add 2001:708:310:54::1/64 dev eth0
# getent ahosts ftp.fi.debian.org
2001:708:310:54::99 STREAM ftp.fi.debian.org
2001:708:310:54::99 DGRAM
2001:708:310:54::99 RAW
130.230.54.99 STREAM
130.230.54.99 DGRAM
130.230.54.99 RAW
So the IPv6 vs IPv4 order actually depends on the local address. This is with
an unmodified gai.conf.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=5507
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libc/5507] gai() sorting is broken
2007-12-18 9:26 [Bug libc/5507] New: gai() sorting is broken madcoder at debian dot org
` (3 preceding siblings ...)
2007-12-18 17:05 ` aurelien at aurel32 dot net
@ 2007-12-18 17:57 ` ismail at pardus dot org dot tr
2007-12-18 18:02 ` aurelien at aurel32 dot net
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ismail at pardus dot org dot tr @ 2007-12-18 17:57 UTC (permalink / raw)
To: glibc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |ismail at pardus dot org dot
| |tr
http://sourceware.org/bugzilla/show_bug.cgi?id=5507
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libc/5507] gai() sorting is broken
2007-12-18 9:26 [Bug libc/5507] New: gai() sorting is broken madcoder at debian dot org
` (4 preceding siblings ...)
2007-12-18 17:57 ` ismail at pardus dot org dot tr
@ 2007-12-18 18:02 ` aurelien at aurel32 dot net
2007-12-18 18:03 ` aurelien at aurel32 dot net
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: aurelien at aurel32 dot net @ 2007-12-18 18:02 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From aurelien at aurel32 dot net 2007-12-18 18:02 -------
The problem is that the labels are not sorted by value in
sysdeps/posix/getaddrinfo.c. The code assumes that they are, so the table is
not sorted if no label is present in /etc/gai.conf.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=5507
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libc/5507] gai() sorting is broken
2007-12-18 9:26 [Bug libc/5507] New: gai() sorting is broken madcoder at debian dot org
` (5 preceding siblings ...)
2007-12-18 18:02 ` aurelien at aurel32 dot net
@ 2007-12-18 18:03 ` aurelien at aurel32 dot net
2008-01-11 0:18 ` drepper at redhat dot com
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: aurelien at aurel32 dot net @ 2007-12-18 18:03 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From aurelien at aurel32 dot net 2007-12-18 18:03 -------
Created an attachment (id=2150)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=2150&action=view)
Patch to fix the bug
--
http://sourceware.org/bugzilla/show_bug.cgi?id=5507
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libc/5507] gai() sorting is broken
2007-12-18 9:26 [Bug libc/5507] New: gai() sorting is broken madcoder at debian dot org
` (6 preceding siblings ...)
2007-12-18 18:03 ` aurelien at aurel32 dot net
@ 2008-01-11 0:18 ` drepper at redhat dot com
2008-01-13 12:49 ` aurelien at aurel32 dot net
2008-02-13 0:50 ` aurelien at aurel32 dot net
9 siblings, 0 replies; 11+ messages in thread
From: drepper at redhat dot com @ 2008-01-11 0:18 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper at redhat dot com 2008-01-11 00:17 -------
(In reply to comment #5)
> Patch to fix the bug
Nonsense. This patch is completely, utterly broken and shows you don't
understand a bit of the code. You move the catch-all entry to the front.
And of course will the order depend on the addresses of the local machine.
That's the whole point of the sorting.
I see nothing wrong.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |WORKSFORME
http://sourceware.org/bugzilla/show_bug.cgi?id=5507
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libc/5507] gai() sorting is broken
2007-12-18 9:26 [Bug libc/5507] New: gai() sorting is broken madcoder at debian dot org
` (7 preceding siblings ...)
2008-01-11 0:18 ` drepper at redhat dot com
@ 2008-01-13 12:49 ` aurelien at aurel32 dot net
2008-02-13 0:50 ` aurelien at aurel32 dot net
9 siblings, 0 replies; 11+ messages in thread
From: aurelien at aurel32 dot net @ 2008-01-13 12:49 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From aurelien at aurel32 dot net 2008-01-13 12:48 -------
(In reply to comment #6)
> (In reply to comment #5)
> > Patch to fix the bug
>
> Nonsense. This patch is completely, utterly broken and shows you don't
> understand a bit of the code. You move the catch-all entry to the front.
>
> And of course will the order depend on the addresses of the local machine.
> That's the whole point of the sorting.
>
> I see nothing wrong.
>
It works for you because you are using a native IPv6 address and not a 6to4
address which has its own label in /etc/gai.conf.
130.230.54.99 DGRAM ftp.fi.debian.org
130.230.54.99 RAW
2001:708:310:54::99 STREAM
2001:708:310:54::99 DGRAM
2001:708:310:54::99 RAW
130.230.54.99 STREAM
I don't really understand why the IPv4/IPv6 order is different for UDP and TCP.
It should be all IPv4 first or all IPv6 first, but not mixed. That is a bug.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|WORKSFORME |
http://sourceware.org/bugzilla/show_bug.cgi?id=5507
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libc/5507] gai() sorting is broken
2007-12-18 9:26 [Bug libc/5507] New: gai() sorting is broken madcoder at debian dot org
` (8 preceding siblings ...)
2008-01-13 12:49 ` aurelien at aurel32 dot net
@ 2008-02-13 0:50 ` aurelien at aurel32 dot net
9 siblings, 0 replies; 11+ messages in thread
From: aurelien at aurel32 dot net @ 2008-02-13 0:50 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From aurelien at aurel32 dot net 2008-02-13 00:49 -------
This bug is actually fixed in CVS.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=5507
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-02-13 0:50 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-18 9:26 [Bug libc/5507] New: gai() sorting is broken madcoder at debian dot org
2007-12-18 9:27 ` [Bug libc/5507] " madcoder at debian dot org
2007-12-18 15:12 ` drepper at redhat dot com
2007-12-18 16:35 ` madcoder at debian dot org
2007-12-18 17:05 ` aurelien at aurel32 dot net
2007-12-18 17:57 ` ismail at pardus dot org dot tr
2007-12-18 18:02 ` aurelien at aurel32 dot net
2007-12-18 18:03 ` aurelien at aurel32 dot net
2008-01-11 0:18 ` drepper at redhat dot com
2008-01-13 12:49 ` aurelien at aurel32 dot net
2008-02-13 0:50 ` aurelien at aurel32 dot net
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).