From owner-freebsd-bugs@FreeBSD.ORG Sat Mar 12 13:10:03 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5127A16A4CE for ; Sat, 12 Mar 2005 13:10:03 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DFE143D5A for ; Sat, 12 Mar 2005 13:10:03 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2CDA284000908 for ; Sat, 12 Mar 2005 13:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2CDA2i9000907; Sat, 12 Mar 2005 13:10:02 GMT (envelope-from gnats) Resent-Date: Sat, 12 Mar 2005 13:10:02 GMT Resent-Message-Id: <200503121310.j2CDA2i9000907@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jeremy Chadwick Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C62816A4CE for ; Sat, 12 Mar 2005 13:01:36 +0000 (GMT) Received: from mx1.parodius.com (mx1.parodius.com [64.62.145.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8640743D31 for ; Sat, 12 Mar 2005 13:01:35 +0000 (GMT) (envelope-from jdc@pentarou.parodius.com) Received: from pentarou.parodius.com (localhost [127.0.0.1]) by mx1.parodius.com (8.13.1/8.13.1) with ESMTP id j2CD1Ap3062179 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 12 Mar 2005 05:01:10 -0800 (PST) (envelope-from jdc@pentarou.parodius.com) Received: (from jdc@localhost) by pentarou.parodius.com (8.13.1/8.13.1/Submit) id j2CD1AE8062178; Sat, 12 Mar 2005 05:01:10 -0800 (PST) (envelope-from jdc) Message-Id: <200503121301.j2CD1AE8062178@pentarou.parodius.com> Date: Sat, 12 Mar 2005 05:01:10 -0800 (PST) From: Jeremy Chadwick To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/78728: ntpd -- noisy when IPv4 or IPv6 interfaces are undefined X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Jeremy Chadwick List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2005 13:10:03 -0000 >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: