Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Feb 2008 04:13:47 +0900
From:      Hajimu UMEMOTO <ume@freebsd.org>
To:        "Heiko Wundram (Beenic)" <wundram@beenic.net>
Cc:        hackers@freebsd.org
Subject:   Re: getaddrinfo() spec doesn't match behaviour
Message-ID:  <yge8x21c0pg.wl%ume@mahoroba.org>
In-Reply-To: <200802031450.19420.wundram@beenic.net>
References:  <200802031450.19420.wundram@beenic.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

>>>>> On Sun, 3 Feb 2008 14:50:18 +0100
>>>>> "Heiko Wundram (Beenic)" <wundram@beenic.net> said:

wundram> hints.ai_flags is logically anded with AI_MASK at the beginning of the 
wundram> function, and AI_MASK (at least in my local netdb.h header) does not contain 
wundram> the flag AI_V4MAPPED. In case the result of that is non-zero (which it is due 
wundram> to me specifying AI_V4MAPPED), the function returns EAI_BADFLAGS.

wundram> After that, getaddrinfo() does some checks on AI_V4MAPPED and AI_ALL (masking 
wundram> the respective flags in case the ai_family isn't AF_INET6), which are 
wundram> basically superfluous (as they can never be set anyway due to AI_MASK), but I 
wundram> didn't find any other reference to the flag in the whole of 
wundram> lib/libc/net/getaddrinfo.c, so I actually don't know whether the cause of 
wundram> this failing is that it simply isn't implemented (completely), or there's any 
wundram> other reason for AI_MASK not to contain these flags that I haven't grasped so 
wundram> far.

Since the part is incomplete support of AI_ALL and AI_V4MAPPED, I've
just nuked it.

http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/net/getaddrinfo.c#rev1.87

Sincerely,

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@mahoroba.org  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?yge8x21c0pg.wl%ume>