From: Danny Mayer Date: Mon, 5 Feb 2007 02:51:15 +0000 (-0500) Subject: Bug #586 Don't do lookups if AI_NUMERICHOST is set X-Git-Tag: NTP_4_2_4_RC3~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccf66bd29335fe357cfc5e1d5860cd62091eb8c1;p=thirdparty%2Fntp.git Bug #586 Don't do lookups if AI_NUMERICHOST is set bk: 45c69ba3RotrnI7e32COru8Tc93ICw --- diff --git a/libntp/ntp_rfc2553.c b/libntp/ntp_rfc2553.c index b5e0ecacc..017ef832b 100644 --- a/libntp/ntp_rfc2553.c +++ b/libntp/ntp_rfc2553.c @@ -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 */