Date: Wed, 20 Sep 2006 22:20:32 GMT From: Brooks Davis <brooks@one-eyed-alien.net> To: freebsd-bugs@FreeBSD.org Subject: Re: conf/103428: devd(8): devd brings up network interfaces early and wrong Message-ID: <200609202220.k8KMKWNY087287@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/103428; it has been noted by GNATS. From: Brooks Davis <brooks@one-eyed-alien.net> To: Rob Austein <sra@hactrn.net> Cc: Brooks Davis <brooks@one-eyed-alien.net>, 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 }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609202220.k8KMKWNY087287>