From owner-freebsd-bugs@FreeBSD.ORG Sun Apr 9 18:30:29 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org 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 DEC8716A405 for ; Sun, 9 Apr 2006 18:30:29 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A922743D4C for ; Sun, 9 Apr 2006 18:30:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k39IUKM1024433 for ; Sun, 9 Apr 2006 18:30:20 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k39IUKRc024426; Sun, 9 Apr 2006 18:30:20 GMT (envelope-from gnats) Resent-Date: Sun, 9 Apr 2006 18:30:20 GMT Resent-Message-Id: <200604091830.k39IUKRc024426@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, "Ricky Y. Sun" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 10DA016A405 for ; Sun, 9 Apr 2006 18:24:51 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0548243D67 for ; Sun, 9 Apr 2006 18:24:50 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k39IOnxL090914 for ; Sun, 9 Apr 2006 18:24:49 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k39IOnxO090913; Sun, 9 Apr 2006 18:24:49 GMT (envelope-from nobody) Message-Id: <200604091824.k39IOnxO090913@www.freebsd.org> Date: Sun, 9 Apr 2006 18:24:49 GMT From: "Ricky Y. Sun" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: misc/95550: NTPD/ntpdate complain about IPv6 interface not found X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2006 18:30:30 -0000 >Number: 95550 >Category: misc >Synopsis: NTPD/ntpdate complain about IPv6 interface not found >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: Sun Apr 09 18:30:19 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Ricky Y. Sun >Release: FreeBSD6.x >Organization: >Environment: FreeBSD 945gd.pewr.com 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #1: Fri Mar 17 08:59:43 PST 2006 root@945gd.pewr.com:/usr/obj/usr/src/sys/PEWR6_P4 i386 >Description: ntpdate (or ntpd -q) will complain that IPv6 interface not found, if INET6 is disabled during kernel rebuilding. This turns out to be the deficiency in contrib/ntp/ntpd/ntp_io.c source code: The following code patch should be, or strongly recommended to be, checked in accordingly: --- contrib/ntp/ntpd/ntp_io.c.orig +++ contrib/ntp/ntpd/ntp_io.c @@ -429,15 +429,23 @@ /*--------------------- BEGIN of PATCH ------------------------ */ 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; /*--------------------- END of PATCH ------------------------ */ >How-To-Repeat: If your FreeBSD 5.x/6.x kernel has no IPv6 (a.k.a. INET6) option built-in, either you start ntpd via /etc/rc.conf or invoke it from CLI... it complains about: " IPv6 interface not found .... ", similar complain if you have only IPv6 interface built in ;-) >Fix: Manually Patched: /usr/src/contrib/ntp/ntpd/ntp_io.c ntp_io.c.orig is the original file which isn't changed ever since 7/20/2004 --- contrib/ntp/ntpd/ntp_io.c.orig +++ contrib/ntp/ntpd/ntp_io.c @@ -429,15 +429,23 @@ /*--------------------- BEGIN of PATCH ------------------------ */ 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; /*--------------------- END of PATCH ------------------------ */ >Release-Note: >Audit-Trail: >Unformatted: