Date: Sat, 12 Mar 2005 05:01:10 -0800 (PST) From: Jeremy Chadwick <freebsd@jdc.parodius.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/78728: ntpd -- noisy when IPv4 or IPv6 interfaces are undefined Message-ID: <200503121301.j2CD1AE8062178@pentarou.parodius.com> Resent-Message-ID: <200503121310.j2CDA2i9000907@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 78728 >Category: bin >Synopsis: ntpd -- noisy when IPv4 or IPv6 interfaces are undefined >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Mar 12 13:10:02 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Jeremy Chadwick >Release: FreeBSD 5.3-STABLE i386 >Organization: Parodius Networking >Environment: System: FreeBSD medusa.parodius.com 5.3-STABLE FreeBSD 5.3-STABLE #0: Sun Feb 6 17:08:22 PST 2005 root@medusa.parodius.com:/usr/obj/usr/src/sys/MEDUSA i386 >Description: ntpd, like BIND, is incredibly noisy about certain IPv4 and IPv6-related network probes. In my case, even when we have a kernel without IPv6 support (i.e. using NOINET6=yes and WITHOUT_IPV6=yes (for ports)), ntpd still bitches about the lack-of IPv6 interfaces: Mar 12 04:20:43 medusa ntpd[13590]: no IPv6 interfaces found Mar 12 04:20:43 medusa kernel: Mar 12 04:20:43 medusa ntpd[13590]: no IPv6 interfaces found The problem here is that the above syslog message is rated LOG_ERR which is extremely rude if not downright incorrect. This also applies to IPv4 interfaces... This matter has been discussed in the past over on the NetBSD list back in 2003. The code in question was changed, adopted from the ntp-dev tree, where developers agreed it should only be printed if debugging is enabled (ntpd -d), and only if debugging was enabled at compile-time. http://lists.ntp.isc.org/pipermail/hackers/2003-December/000608.html http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=23703 http://cvsweb.netbsd.org/bsdweb.cgi/src/dist/ntp/ntpd/ntp_io.c.diff?r1=1.9&r2=1.10&f=h >How-To-Repeat: Start ntpd on a machine which has no IPv6 support in the kernel, OR, has no IPv6 interfaces defined. >Fix: Apply the below patch (for RELENG_5). Verified as working. Would be nice to get this in for 5.4... :-) --- contrib/ntp/ntpd/ntp_io.c.orig Tue Jul 20 08:01:27 2004 +++ contrib/ntp/ntpd/ntp_io.c Sat Mar 12 04:55:19 2005 @@ -429,15 +429,23 @@ if (isc_net_probeipv6() == ISC_R_SUCCESS) scan_ipv6 = ISC_TRUE; -#ifdef HAVE_IPV6 +#if defined(HAVE_IPV6) && defined(DEBUG) else - netsyslog(LOG_ERR, "no IPv6 interfaces found"); + { + if (debug) + netsyslog(LOG_ERR, "no IPv6 interfaces found"); + } #endif if (isc_net_probeipv4() == ISC_R_SUCCESS) scan_ipv4 = ISC_TRUE; +#ifdef DEBUG else - netsyslog(LOG_ERR, "no IPv4 interfaces found"); + { + if (debug) + netsyslog(LOG_ERR, "no IPv4 interfaces found"); + } +#endif nwilds = create_wildcards(port); idx = nwilds; >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503121301.j2CD1AE8062178>