]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Bug #586 Don't do lookups if AI_NUMERICHOST is set
authorDanny Mayer <mayer@ntp.org>
Mon, 5 Feb 2007 02:51:15 +0000 (21:51 -0500)
committerDanny Mayer <mayer@ntp.org>
Mon, 5 Feb 2007 02:51:15 +0000 (21:51 -0500)
bk: 45c69ba3RotrnI7e32COru8Tc93ICw

libntp/ntp_rfc2553.c

index b5e0ecacc9646bdedbcfe06476b8fd71b1aa804e..017ef832b9535744f2ce964595d17f8580975a14 100644 (file)
@@ -393,6 +393,12 @@ do_nodename(
                return (0);
        }
 
+       /*
+        * If the numeric host flag is set, don't attempt resolution
+        */
+       if (hints != NULL && (hints->ai_flags & AI_NUMERICHOST))
+               return (EAI_NONAME);
+
        /*
         * Look for a name
         */