From: Dave Hart Date: Tue, 18 May 2010 00:36:59 +0000 (+0000) Subject: [Bug 1558] pool prototype associations have 0.0.0.0 for remote addr. X-Git-Tag: NTP_4_2_7P32~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0c12adc0e4860db28297b4afb4acfbfb1bc87a1;p=thirdparty%2Fntp.git [Bug 1558] pool prototype associations have 0.0.0.0 for remote addr. bk: 4bf1e12bQD3XbFJ9eBW0rMmZ6Cu60A --- diff --git a/ChangeLog b/ChangeLog index dee6e8239..281d32e45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ * [Bug 1555] from 4.2.6p2-RC4: sntp illegal C (mixed code and declarations). +* [Bug 1558] pool prototype associations have 0.0.0.0 for remote addr. * configure.ac: add --disable-autokey, #define AUTOKEY to enable future support for building without Autokey, but with OpenSSL for its digest algorithms (hash functions). Code must be modified to use #ifdef diff --git a/ntpq/ntpq-subs.c b/ntpq/ntpq-subs.c index 143d55e85..f4e9c9bc1 100644 --- a/ntpq/ntpq-subs.c +++ b/ntpq/ntpq-subs.c @@ -1779,7 +1779,9 @@ doprintpeers( if (numhosts > 1) fprintf(fp, "%-*s ", maxhostlen, currenthost); if (AF_UNSPEC == af || AF(&srcadr) == af) { - strncpy(clock_name, nntohost(&srcadr), sizeof(clock_name)); + if (!havevar[HAVE_SRCHOST]) + strncpy(clock_name, nntohost(&srcadr), + sizeof(clock_name)); fprintf(fp, "%c%-15.15s ", c, clock_name); drlen = strlen(dstadr_refid); makeascii(drlen, dstadr_refid, fp);