Re: broken IPv6 code
On Sun, 31 Dec 2000, YOSHIFUJI Hideaki / [iso-2022-jp] 吉藤英明 wrote:
> In article <[🔎] Pine.LNX.4.21.0012311302580.29764-100000@picard.cistron.nl> (at Sun, 31 Dec 2000 13:13:43 +0100 (CET)), Jeroen Massar <jeroen@unfix.org> says:
>
> > Though on most UNIX'es (using KAME at least) listening on IPv6 will
> > also listen on IPv4, On FreeBSD:
> > 8<----
> > tcp46 0 0 *.domain *.* LISTEN
> > ------>8
>
> On freebsd3 and later. freebsd2 behaves differently.
Great huh... they simply did that to confuse the programmers.
This really is one of the many headaches one gets programming for UNIX'es.
>
>
> > * This version also checks for addresses that are actually IPv4.
> > * eg. ::ffff:10:100:13:66 or 0:0:0:0:0:ffff:10.100.13.66 is actualy the
> ~~~~~~~~~~~~~~~~~~~ ::ffff:10.100.13.66
> > * the IPv6 notation for 10.100.13.66 in IPv4.
>
>
> > This info is also needed when one needs to due reverse lookups because
> > IPv4 reverse's are in the "in-addr.arpa" domain and the IPv6 reverses are
> > in the "ip6.int" domain, noting that the ::ffff range isn't reverse mapped
> > into the in-addr.arpa part...
>
> getnameinfo() (and gethostbyaddr()) do this automatically.
Not if you want your own dns resolving because you need the asynchronous
lookups, which is like quite common in ircd's.
Greets,
Jeroen
Reply to: