Serge Bets <[EMAIL PROTECTED]> wrote:

> It seems you are right on the track: My system has no getaddrinfo(). So
> ntpq 4.2.4 uses its own bundled replacement from libntp/ntp_rfc2553.c,
> which doesn't seem to make use of AI_NUMERICHOST.

Ah, I hadn't spotted that: that is a bug in the ntpq code.
I think it can be fixed in ntp_rfc2553.c/do_nodename(),
something along these lines:

--- ntp_rfc2553.c.orig  Thu Dec 28 12:03:08 2006
+++ ntp_rfc2553.c       Thu Feb  1 11:40:40 2007
@@ -397,6 +397,9 @@
         * Look for a name
         */
 
+       if (hints && (hints->ai_flags & AI_NUMERICHOST))
+               return (EAI_NONAME);
+
        errval = DNSlookup_name(nodename, AF_INET, &hp);
 
        if (hp == NULL) {


There are probably more elegant alternatives ...

-- 
Ronan Flood <[EMAIL PROTECTED]>

_______________________________________________
questions mailing list
[email protected]
https://lists.ntp.isc.org/mailman/listinfo/questions

Reply via email to