[ntp:questions] Pool returns IPv6 address to IPv4 query

Rick Jones rick.jones2 at hp.com
Tue Nov 19 19:54:36 UTC 2013


Danny Mayer <mayer at ntp.org> wrote:
> That's not the what you need to do if you only want IPv4. You need
> to set ai_family to AF_INET in the hints structure before making the
> call.  IF you specify -4 on the ntpd command line, that's what we do
> when fetching IP addresses from the name server. There's no magic
> here, it just works.

Probably drifting even farther, but that wasn't the issue so much
behind getaddrinfo()'s altered behaviour.  It was that applications,
which were ambidextrous (could do either v4 or v6), started getting
IPv6 addresses, but for which there was not actual IPv6 connectivity.
Getting the global IPv6 address(es) for mumble.fadTLD when all one had
were link-scope IPv6 addresses and no through connectivity.  If those
happened to be earlier in the list, the application could end-up
waiting for the connection timeout before proceeding to the next ones.
It wasn't that the application didn't want an IPv6 address so much as
it wanted only addresses there was a (perceived to be) reasonable
chance of success reaching.

People waiting on the application(s) were impatient, and so pushed
(perhaps transitively through the applciation developers) to have
getaddrinfo() AI_ADDRCONFIG only return IPv6 addresses when there was
something other than link-scope IPv6 addresses assigned to the system.
While IPv6 is supposed to (?) eliminate NAT, I suspect there are still
cases with link-scope addresses that go through NAT, which means that
heuristic/expedient of "don't give IPv6 unless there is
better-than-link-scope configured" may not really be such a good one.

Where it all stands today wrt the various getaddrinfo()
implementations, I'm not entirely sure.

rick jones
-- 
The glass is neither half-empty nor half-full. The glass has a leak.
The real question is "Can it be patched?"
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...



More information about the questions mailing list