From jdc@pentarou.parodius.com  Sat Mar 12 13:01:36 2005
Return-Path: <jdc@pentarou.parodius.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 3C62816A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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 <freebsd@jdc.parodius.com>
Reply-To: Jeremy Chadwick <freebsd@jdc.parodius.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ntpd -- noisy when IPv4 or IPv6 interfaces are undefined
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         78728
>Category:       bin
>Synopsis:       [patch] ntpd(8) -- noisy when IPv4 or IPv6 interfaces are undefined
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    roberto
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 12 13:10:02 GMT 2005
>Closed-Date:    Sun Sep 07 22:52:08 UTC 2008
>Last-Modified:  Sun Sep 07 22:52:08 UTC 2008
>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:

From: Jeremy Chadwick <freebsd@jdc.parodius.com>
To: bug-followup@FreeBSD.org, freebsd@jdc.parodius.com
Cc:  
Subject: Re: bin/78728: ntpd -- noisy when IPv4 or IPv6 interfaces are undefined
Date: Sat, 11 Feb 2006 06:00:13 -0800

 Any chance we can get this in before 6.1 and 5.5?  It's been sitting
 open for almost a year now...  :-)
 
 -- 
 | Jeremy Chadwick                                 jdc at parodius.com |
 | Parodius Networking                        http://www.parodius.com/ |
 | UNIX Systems Administrator                   Mountain View, CA, USA |
 | Making life hard for others since 1977.                             |
 

From: keve@Safe-mail.net
To: bug-followup@freebsd.org, freebsd@jdc.parodius.com
Cc:  
Subject: Re: bin/78728: ntpd -- noisy when IPv4 or IPv6 interfaces are undefined
Date: Fri, 1 Jun 2007 12:46:11 -0400

 I re-discovered this issue this week on FreeBSD/i386 6.2-RELEASE-p4. Before submitting a new PR my search found that this problem has been reported already multiple times. PRs bin/78728 and bin/95550 appear to be duplicates of each other. It has been over a year now and even though the solution patches were provided and the fix can already be found in NetBSD code, no improvement was done here.
 This is a shame!
 I see no point in filing another PR. Could somebody please give this a kick!
State-Changed-From-To: open->suspended 
State-Changed-By: remko 
State-Changed-When: Sat May 17 12:23:47 UTC 2008 
State-Changed-Why:  
Mark as suspended because we most often do not change the contributed 
code in the tree, any chance that th is can be imported into the main 
tree so that we can import that? 


http://www.freebsd.org/cgi/query-pr.cgi?pr=78728 

From: Gavin Atkinson <gavin@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/78728: [patch] ntpd(8) -- noisy when IPv4 or IPv6
	interfaces are undefined
Date: Mon, 07 Jul 2008 19:27:55 +0100

 Note that this has already been incorporated upstream as of at least NTP
 4.2.2.  Currently in FreeBSD we have 4.2.0 (was released 15-Oct-2003),
 whereas 4.2.4p4 is currently available from the vendor.
 
Responsible-Changed-From-To: freebsd-bugs->roberto 
Responsible-Changed-By: jhb 
Responsible-Changed-When: Mon Jul 28 21:35:27 UTC 2008 
Responsible-Changed-Why:  
Ollivier is the ntpd maintainer and is already working on importing a newer 
version of ntpd. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=78728 
State-Changed-From-To: suspended->closed 
State-Changed-By: roberto 
State-Changed-When: Sun Sep 7 22:51:43 UTC 2008 
State-Changed-Why:  
Update to 4.2.4p5 includes this. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=78728 
>Unformatted:
