[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-standards
Subject: standards/114910: getaddrinfo() fails to set ai_canonname
From: Mark Andrews <marka () isc ! org>
Date: 2007-07-25 20:12:25
Message-ID: 200707252012.l6PKCP9d047284 () drugs ! dv ! isc ! org
[Download RAW message or body]
> Number: 114910
> Category: standards
> Synopsis: getaddrinfo() fails to set ai_canonname
> Confidential: no
> Severity: serious
> Priority: medium
> Responsible: freebsd-standards
> State: open
> Quarter:
> Keywords:
> Date-Required:
> Class: sw-bug
> Submitter-Id: current-users
> Arrival-Date: Wed Jul 25 20:20:02 GMT 2007
> Closed-Date:
> Last-Modified:
> Originator: Mark Andrews
> Release: FreeBSD 6.2-STABLE i386
> Organization:
ISC
> Environment:
System: FreeBSD drugs.dv.isc.org 6.2-STABLE FreeBSD 6.2-STABLE #16: Fri Apr 27 \
13:32:57 EST 2007 marka@drugs.dv.isc.org:/usr/obj/usr/src/sys/DRUGS i386
> Description:
getaddrinfo() fails to set ai->ai_canonname when requested.
> How-To-Repeat:
Run the following. It will fail one time in two, I suspect that
it is related to the AAAA address and their return order.
flag.ep.net. 167913 IN A 198.32.4.13
flag.ep.net. 81490 IN AAAA 2001:478:6:0:2d0:b7ff:fee8:c4d9
flag.ep.net. 81490 IN AAAA 3ffe:805::2d0:b7ff:fee8:c4d9
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <stdio.h>
int
main () {
struct addrinfo hints, *ai = NULL, *cur;
int result;
memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_CANONNAME;
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = 0;
result = getaddrinfo("FLAG.EP.NET", NULL, &hints, &ai);
if ((result && ai) || (result == 0 && (ai == NULL || ai->ai_canonname == NULL)))
fprintf(stderr, "getaddrinfo %d %p %p\n", result, ai, ai?ai->ai_canonname:NULL);
exit(0);
};
> Fix:
> Release-Note:
> Audit-Trail:
> Unformatted:
_______________________________________________
freebsd-standards@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-standards
To unsubscribe, send any mail to "freebsd-standards-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic