From owner-freebsd-bugs@FreeBSD.ORG Wed Sep 20 22:20:33 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 1415016A407 for ; Wed, 20 Sep 2006 22:20:33 +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 B156643D46 for ; Wed, 20 Sep 2006 22:20:32 +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 k8KMKWo3087288 for ; Wed, 20 Sep 2006 22:20:32 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k8KMKWNY087287; Wed, 20 Sep 2006 22:20:32 GMT (envelope-from gnats) Date: Wed, 20 Sep 2006 22:20:32 GMT Message-Id: <200609202220.k8KMKWNY087287@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Brooks Davis Cc: Subject: Re: conf/103428: devd(8): devd brings up network interfaces early and wrong X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Brooks Davis List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2006 22:20:33 -0000 The following reply was made to PR conf/103428; it has been noted by GNATS. From: Brooks Davis To: Rob Austein Cc: Brooks Davis , freebsd-gnats-submit@freebsd.org Subject: Re: conf/103428: devd(8): devd brings up network interfaces early and wrong Date: Wed, 20 Sep 2006 17:10:07 -0500 On Wed, Sep 20, 2006 at 05:23:31PM -0400, Rob Austein wrote: > At this point I suspect that the problem is that pccard_ether is > attempting to bring up IPv6 on interface hardware that's not connected > to anything, which is confusing /etc/network.subr into listening for > router advertisements when it should not. I added a debug line to > network.subr to make network6_interface_setup log the interface it's > about to whack, enabled rc_debug, and got the console output below. > It's not touching bge0 or lo0, but it's trying to bring up IPv6 on > bge1 and plip0, neither of which is connected to anything. I see the problem, but solution is doesn't look like it's going to be easy, particularly for something we can MFC. The following coupled with manually setting ipv6_network_interfaces might be a decent option for now. Eventually I think we'll want to adjust the way this stuff works a fair bit, but there's a limit to how much we can change in stable since we definitely don't want to break existing setups. -- Brooks Index: network.subr =================================================================== RCS file: /home/ncvs/src/etc/network.subr,v retrieving revision 1.172 diff -u -p -r1.172 network.subr --- network.subr 17 Aug 2006 03:03:38 -0000 1.172 +++ network.subr 20 Sep 2006 22:06:53 -0000 @@ -237,6 +237,30 @@ wpaif() return 1 } +# ipv6if if +# Returns 0 if the interface should be configured for IPv6 and +# 1 otherwise. +ipv6if() +{ + if ! checkyesno ipv6_enable; then + return 0 + fi + case "${ipv6_network_interfaces}" in + [Aa][Uu][Tt][Oo]) + return 0 + ;; + ''|[Nn][Oo][Nn][Ee]) + return 1 + ;; + esac + for v6if in ${ipv6_network_interfaces}; do + if [ "${v6if}" = "${1}" ]; then + return 0 + fi + done + return 1 +} + # ifexists if # Returns 0 if the interface exists and 1 otherwise. ifexists() Index: pccard_ether =================================================================== RCS file: /home/ncvs/src/etc/pccard_ether,v retrieving revision 1.52 diff -u -p -r1.52 pccard_ether --- pccard_ether 20 Sep 2006 19:48:31 -0000 1.52 +++ pccard_ether 20 Sep 2006 22:06:53 -0000 @@ -89,7 +89,11 @@ pccard_ether_start() fi # IPv6 setup - if checkyesno ipv6_enable; then + if ipv6if $ifn; then + # XXX: network6_interface_setup assumes you're calling + # it with ALL the IPv6 interfaces at once and thus isn't + # really appropraite for this job, but it's the best we've + # got for now. network6_interface_setup $ifn fi }