From owner-svn-src-head@FreeBSD.ORG Fri Oct 4 04:15:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 04030870; Fri, 4 Oct 2013 04:15:19 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E47F922ED; Fri, 4 Oct 2013 04:15:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r944FI1X055209; Fri, 4 Oct 2013 04:15:18 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r944FIuT055208; Fri, 4 Oct 2013 04:15:18 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201310040415.r944FIuT055208@svn.freebsd.org> From: Hiroki Sato Date: Fri, 4 Oct 2013 04:15:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256040 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Oct 2013 04:15:19 -0000 Author: hrs Date: Fri Oct 4 04:15:18 2013 New Revision: 256040 URL: http://svnweb.freebsd.org/changeset/base/256040 Log: Do not attempt to do AF-specific configurations on a interface when noafif() is true. The following warning message was displayed when pflog0 interface existed, for example: ifconfig: ioctl(SIOCGIFINFO_IN6): Protocol family not supported Reported by: bz Approved by: re (gjb) Modified: head/etc/network.subr Modified: head/etc/network.subr ============================================================================== --- head/etc/network.subr Fri Oct 4 02:44:04 2013 (r256039) +++ head/etc/network.subr Fri Oct 4 04:15:18 2013 (r256040) @@ -48,9 +48,11 @@ ifn_start() ifscript_up ${ifn} && cfg=0 ifconfig_up ${ifn} && cfg=0 - afexists inet && ipv4_up ${ifn} && cfg=0 - afexists inet6 && ipv6_up ${ifn} && cfg=0 - afexists ipx && ipx_up ${ifn} && cfg=0 + if ! noafif $ifn; then + afexists inet && ipv4_up ${ifn} && cfg=0 + afexists inet6 && ipv6_up ${ifn} && cfg=0 + afexists ipx && ipx_up ${ifn} && cfg=0 + fi childif_create ${ifn} && cfg=0 return $cfg @@ -68,9 +70,11 @@ ifn_stop() [ -z "$ifn" ] && err 1 "ifn_stop called without an interface" - afexists ipx && ipx_down ${ifn} && cfg=0 - afexists inet6 && ipv6_down ${ifn} && cfg=0 - afexists inet && ipv4_down ${ifn} && cfg=0 + if ! noafif $ifn; then + afexists ipx && ipx_down ${ifn} && cfg=0 + afexists inet6 && ipv6_down ${ifn} && cfg=0 + afexists inet && ipv4_down ${ifn} && cfg=0 + fi ifconfig_down ${ifn} && cfg=0 ifscript_down ${ifn} && cfg=0 childif_destroy ${ifn} && cfg=0 @@ -103,7 +107,7 @@ ifconfig_up() fi # inet6 specific - if afexists inet6; then + if ! noafif $1 && afexists inet6; then if checkyesno ipv6_activate_all_interfaces; then _ipv6_opts="-ifdisabled" elif [ "$1" != "lo0" ]; then @@ -463,6 +467,7 @@ noafif() case $_if in pflog[0-9]*|\ pfsync[0-9]*|\ + usbus[0-9]*|\ an[0-9]*|\ ath[0-9]*|\ ipw[0-9]*|\