From owner-svn-src-all@FreeBSD.ORG Wed Sep 30 14:58:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AF6C106568B; Wed, 30 Sep 2009 14:58:10 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 79B148FC1A; Wed, 30 Sep 2009 14:58:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8UEwAtS018450; Wed, 30 Sep 2009 14:58:10 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8UEwAkp018447; Wed, 30 Sep 2009 14:58:10 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <200909301458.n8UEwAkp018447@svn.freebsd.org> From: Hajimu UMEMOTO Date: Wed, 30 Sep 2009 14:58:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197646 - head/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Sep 2009 14:58:10 -0000 Author: ume Date: Wed Sep 30 14:58:10 2009 New Revision: 197646 URL: http://svn.freebsd.org/changeset/base/197646 Log: Don't do an IPv6 operation when the kernel doesn't have an IPv6 support. Reported by: Alexander Best Confirmed by: Paul B. Mahol , Alexander Best Modified: head/etc/rc.d/netoptions head/etc/rc.d/routing Modified: head/etc/rc.d/netoptions ============================================================================== --- head/etc/rc.d/netoptions Wed Sep 30 14:42:06 2009 (r197645) +++ head/etc/rc.d/netoptions Wed Sep 30 14:58:10 2009 (r197646) @@ -9,6 +9,7 @@ # KEYWORD: nojail . /etc/rc.subr +. /etc/network.subr name="netoptions" start_cmd="netoptions_start" @@ -66,11 +67,13 @@ netoptions_start() ;; esac - if checkyesno ipv6_ipv4mapping; then - ${SYSCTL_W} net.inet6.ip6.v6only=0 >/dev/null - else - echo -n " no-ipv4-mapped-ipv6" - ${SYSCTL_W} net.inet6.ip6.v6only=1 >/dev/null + if afexists inet6; then + if checkyesno ipv6_ipv4mapping; then + ${SYSCTL_W} net.inet6.ip6.v6only=0 >/dev/null + else + echo -n " no-ipv4-mapped-ipv6" + ${SYSCTL_W} net.inet6.ip6.v6only=1 >/dev/null + fi fi [ -n "${_netoptions_initdone}" ] && echo '.' Modified: head/etc/rc.d/routing ============================================================================== --- head/etc/rc.d/routing Wed Sep 30 14:42:06 2009 (r197645) +++ head/etc/rc.d/routing Wed Sep 30 14:58:10 2009 (r197646) @@ -51,7 +51,9 @@ static_start() ;; *) do_static inet add - do_static inet6 add + if afexists inet6; then + do_static inet6 add + fi do_static atm add ;; esac @@ -74,7 +76,9 @@ static_stop() ;; *) do_static inet delete - do_static inet6 delete + if afexists inet6; then + do_static inet6 delete + fi do_static atm delete ;; esac