Date: Sun, 9 Apr 2006 18:24:49 GMT From: "Ricky Y. Sun" <sunyuxi@yahoo.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/95550: NTPD/ntpdate complain about IPv6 interface not found Message-ID: <200604091824.k39IOnxO090913@www.freebsd.org> Resent-Message-ID: <200604091830.k39IUKRc024426@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604091824.k39IOnxO090913>