From: Jakub Jelinek Date: Fri, 12 Jan 2007 15:07:32 +0000 (+0000) Subject: [BZ #3369] X-Git-Tag: cvs/fedora-glibc-2_5-20070712T1701~106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b004c59dd78161f1b2ec49f9ea8d8a4c58f5e5e;p=thirdparty%2Fglibc.git [BZ #3369] * sysdeps/posix/getaddrinfo.c (rfc3484_sort): Fix typos in rules 4 and 7. --- diff --git a/ChangeLog b/ChangeLog index d3647a86133..97461c2398b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-10-16 Ulrich Drepper + + [BZ #3369] + * sysdeps/posix/getaddrinfo.c (rfc3484_sort): Fix typos in rules 4 + and 7. + 2006-10-13 Ulrich Drepper * elf/dl-minimal.c (realloc): Optimize last patch. diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index 9387e20db24..84a6293365b 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -1395,10 +1395,10 @@ rfc3484_sort (const void *p1, const void *p2) { if (!(a1->source_addr_flags & in6ai_homeaddress) && (a2->source_addr_flags & in6ai_homeaddress)) - return -1; + return 1; if ((a1->source_addr_flags & in6ai_homeaddress) && !(a2->source_addr_flags & in6ai_homeaddress)) - return 1; + return -1; } /* Rule 5: Prefer matching label. */ @@ -1435,11 +1435,11 @@ rfc3484_sort (const void *p1, const void *p2) if (a1->got_source_addr) { if (!(a1->source_addr_flags & in6ai_temporary) - && (a1->source_addr_flags & in6ai_temporary)) + && (a2->source_addr_flags & in6ai_temporary)) return -1; if ((a1->source_addr_flags & in6ai_temporary) - && !(a1->source_addr_flags & in6ai_temporary)) - return -1; + && !(a2->source_addr_flags & in6ai_temporary)) + return 1; /* XXX Do we need to check anything beside temporary addresses? */ }