Bug 3369 - RFC3484 Rule 7 sorting inconsistent
Summary: RFC3484 Rule 7 sorting inconsistent
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-16 12:41 UTC by Rémi Denis-Courmont
Modified: 2016-08-22 13:39 UTC (History)
1 user (show)

See Also:
Host: N/A
Target: N/A
Build: N/A
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rémi Denis-Courmont 2006-10-16 12:41:20 UTC
In file libc/sysdeps/posix/getaddrinfo.c (rev 1.107), in function rfc3484_sort,
implementation of "Rule 7" seems to be a logical no-op.

Both ifs in the following excerpt are always false, since the conditions are
essentially "a1 is temporary and a1 is not temporary":

      if (!(a1->source_addr_flags & in6ai_temporary)
          && (a1->source_addr_flags & in6ai_temporary))
        return -1;
      if ((a1->source_addr_flags & in6ai_temporary)
          && !(a1->source_addr_flags & in6ai_temporary))
        return -1;

Probably a2 should be involved somewhere.
Comment 1 Ulrich Drepper 2006-10-16 15:19:52 UTC
Fixed in cvs.
Comment 2 Sourceware Commits 2007-01-12 15:07:49 UTC
Subject: Bug 3369

CVSROOT:	/cvs/glibc
Module name:	libc
Branch: 	glibc-2_5-branch
Changes by:	jakub@sourceware.org	2007-01-12 15:07:33

Modified files:
	.              : ChangeLog 
	sysdeps/posix  : getaddrinfo.c 

Log message:
	[BZ #3369]
	* sysdeps/posix/getaddrinfo.c (rfc3484_sort): Fix typos in rules 4
	and 7.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/ChangeLog.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.10362.2.5&r2=1.10362.2.6
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/posix/getaddrinfo.c.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.107&r2=1.107.2.1