From owner-freebsd-bugs@FreeBSD.ORG Tue Jun 25 12:20:02 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EECBD587 for ; Tue, 25 Jun 2013 12:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id D14FA17FE for ; Tue, 25 Jun 2013 12:20:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r5PCK2wc057314 for ; Tue, 25 Jun 2013 12:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r5PCK2t5057313; Tue, 25 Jun 2013 12:20:02 GMT (envelope-from gnats) Resent-Date: Tue, 25 Jun 2013 12:20:02 GMT Resent-Message-Id: <201306251220.r5PCK2t5057313@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, Sayetsky Anton Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1C4E0184 for ; Tue, 25 Jun 2013 12:14:10 +0000 (UTC) (envelope-from jason@jw.lds.net.ua) Received: from jw.lds.net.ua (jw.lds.net.ua [193.192.37.74]) by mx1.freebsd.org (Postfix) with ESMTP id A7DF6179B for ; Tue, 25 Jun 2013 12:14:09 +0000 (UTC) Received: from jw.lds.net.ua (localhost [127.0.0.1]) by jw.lds.net.ua (8.14.5/8.14.5) with ESMTP id r5PCE1DH076492 for ; Tue, 25 Jun 2013 15:14:01 +0300 (EEST) (envelope-from jason@jw.lds.net.ua) Received: (from jason@localhost) by jw.lds.net.ua (8.14.5/8.14.5/Submit) id r5PCDu9L076491; Tue, 25 Jun 2013 15:13:56 +0300 (EEST) (envelope-from jason) Message-Id: <201306251213.r5PCDu9L076491@jw.lds.net.ua> Date: Tue, 25 Jun 2013 15:13:56 +0300 (EEST) From: Sayetsky Anton To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/179963: ntpd(8) tries to bind IFDISABLED IPv6 addresses X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Sayetsky Anton List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jun 2013 12:20:03 -0000 >Number: 179963 >Category: bin >Synopsis: ntpd(8) tries to bind IFDISABLED IPv6 addresses >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: Tue Jun 25 12:20:02 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Sayetsky Anton >Release: FreeBSD 9.1-RELEASE-p3 amd64 >Organization: >Environment: System: FreeBSD pxe.local 9.1-RELEASE-p2 FreeBSD 9.1-RELEASE-p2 #0: Sun Apr 28 16:07:37 EEST 2013 root@pxe.local:/usr/obj/usr/src/sys/PXESRV amd64 >Description: ntpd tries to bind IPv6 addresses even if the none of them configured. You can see the following errors (but sometimes ntpd starts without errors): Jun 25 14:43:43 pxe kernel: Jun 25 14:43:43 pxe ntpd[701]: bind() fd 27, family AF_INET6, port 123, scope 1, addr fe80::250:56ff:febf:12, mcast=0 flags=0x11 fails: Can't assign requested address Jun 25 14:43:43 pxe kernel: Jun 25 14:43:43 pxe ntpd[701]: unable to create socket on em0 (7) for fe80::250:56ff:febf:12#123 But it still binds to IFDISABLED auto-address: root@pxe:~# sockstat | grep ntpd root ntpd 701 3 dgram -> /var/run/logpriv root ntpd 701 20 udp4 *:123 *:* root ntpd 701 21 udp6 *:123 *:* root ntpd 701 22 udp4 10.0.0.16:123 *:* root ntpd 701 23 udp6 ::1:123 *:* root ntpd 701 24 udp6 fe80:3::1:123 *:* root ntpd 701 25 udp4 127.0.0.1:123 *:* root ntpd 701 27 udp6 fe80:1::250:56ff:febf:12:123 *:* root@pxe:~# Configs below: root@pxe:~# ifconfig em0: flags=8843 metric 0 mtu 1500 options=9b ether 00:50:56:bf:00:12 inet 10.0.0.16 netmask 0xffffffe0 broadcast 10.0.0.31 inet6 fe80::250:56ff:febf:12%em0 prefixlen 64 scopeid 0x1 nd6 options=29 media: Ethernet autoselect (1000baseT ) status: active ipfw0: flags=8801 metric 0 mtu 65536 nd6 options=29 lo0: flags=8049 metric 0 mtu 16384 options=600003 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff000000 nd6 options=21 root@pxe:~# cat /etc/ntp.conf # # $FreeBSD: releng/9.1/etc/ntp.conf 239608 2012-08-23 04:57:56Z delphij $ # # Default NTP servers for the FreeBSD operating system. # # Don't forget to enable ntpd in /etc/rc.conf with: # ntpd_enable="YES" # # The driftfile is by default /var/db/ntpd.drift, check # /etc/defaults/rc.conf on how to change the location. # server ntp.lds.net.ua iburst maxpoll 9 restrict ntp.lds.net.ua nomodify nopeer noquery notrap server ntp1.lds.net.ua iburst maxpoll 9 restrict ntp1.lds.net.ua nomodify nopeer noquery notrap server ntp2.lds.net.ua iburst maxpoll 9 restrict ntp2.lds.net.ua nomodify nopeer noquery notrap restrict 127.0.0.1 restrict -6 ::1 restrict default ignore server 127.127.1.0 restrict 127.127.1.0 fudge 127.127.1.0 stratum 10 restrict netmon.lds.local nomodify nopeer notrap restrict netmon.lds.net.ua nomodify nopeer notrap root@pxe:~# egrep "^ifconfig|^ntpd" /etc/rc.conf ifconfig_em0="inet 10.0.0.16 netmask 255.255.255.224" ntpd_enable="YES" ntpd_config="/etc/ntp.conf" ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift" ntpd_sync_on_start="YES" root@pxe:~# >How-To-Repeat: Just enable ntpd on a machine without configured IPv6 addresses. >Fix: >Release-Note: >Audit-Trail: >Unformatted: