From owner-svn-src-all@FreeBSD.ORG Wed Sep 4 20:21:20 2013 Return-Path: Delivered-To: svn-src-all@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 5DFE43D8; Wed, 4 Sep 2013 20:21:20 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 60B5E22CB; Wed, 4 Sep 2013 20:21:17 +0000 (UTC) Received: from alph.d.allbsd.org (p2049-ipbf1102funabasi.chiba.ocn.ne.jp [122.26.101.49]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id r84KKvF6059332 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 5 Sep 2013 05:21:07 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.5/8.14.5) with ESMTP id r84KKtNL079909; Thu, 5 Sep 2013 05:20:56 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Thu, 05 Sep 2013 05:19:41 +0900 (JST) Message-Id: <20130905.051941.1980191753384588454.hrs@allbsd.org> To: asomers@FreeBSD.org Subject: Re: svn commit: r253924 - in head: etc etc/rc.d share/man/man5 From: Hiroki Sato In-Reply-To: References: <201308040636.r746aI5i038931@svn.freebsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart0(Thu_Sep__5_05_19_41_2013_357)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Thu, 05 Sep 2013 05:21:07 +0900 (JST) X-Spam-Status: No, score=-90.6 required=13.0 tests=CONTENT_TYPE_PRESENT, DIRECTOCNDYN,DYN_PBL,RCVD_IN_PBL,SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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, 04 Sep 2013 20:21:20 -0000 ----Security_Multipart0(Thu_Sep__5_05_19_41_2013_357)-- Content-Type: Multipart/Mixed; boundary="--Next_Part(Thu_Sep__5_05_19_41_2013_886)--" Content-Transfer-Encoding: 7bit ----Next_Part(Thu_Sep__5_05_19_41_2013_886)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Alan Somers wrote in : as> With this revision, I am unable to down an ipv4 interface using as> "/etc/rc.d/netif stop em1". When I try, ipv4_down cannot find the address as> to delete, because "$_inet" begins with a tab character and the therefore as> it matches the "*)" rule in the case statement. Presumably "$_inet" as> doesn't always begin with a tab, so this patch will match with or without as> the tab. Does it look good to you? as> as> --- /usr/home/alans/freebsd/head/etc/network.subr 2013-08-20 as> 19:33:30.6712 as> 28832 +0000 as> +++ /etc/network.subr 2013-08-22 15:49:53.000000000 +0000 as> @@ -661,16 +668,16 @@ as> for _inet in $inetList ; do as> # get rid of extraneous line as> case $_inet in as> - "") break ;; as> - inet\ *) ;; as> - *) continue ;; as> + "") break ;; as> + \ inet\ *|inet\ *) ;; as> + *) continue ;; as> esac as> [ -z "$_inet" ] && break Sorry for the delay getting back to you. Can you try the attached patch? It includes some other fixes but I think adding \t to tr(1) should be enough to solve the problem. -- Hiroki ----Next_Part(Thu_Sep__5_05_19_41_2013_886)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="network.subr.20130905-1.diff" Index: etc/network.subr =================================================================== --- etc/network.subr (revision 254465) +++ etc/network.subr (working copy) @@ -654,7 +654,7 @@ ifalias ${_if} inet -alias && _ret=0 - inetList="`${IFCONFIG_CMD} ${_if} | grep 'inet ' | tr "\n" "$_ifs"`" + inetList="`${IFCONFIG_CMD} ${_if} | grep 'inet ' | tr "\n\t" "$_ifs"`" oldifs="$IFS" IFS="$_ifs" @@ -661,11 +661,9 @@ for _inet in $inetList ; do # get rid of extraneous line case $_inet in - "") break ;; inet\ *) ;; *) continue ;; esac - [ -z "$_inet" ] && break _inet=`expr "$_inet" : '.*\(inet \([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}\).*'` @@ -696,13 +694,16 @@ ipv6_prefix_hostid_addr_common ${_if} -alias && _ret=0 ifalias ${_if} inet6 -alias && _ret=0 - inetList="`${IFCONFIG_CMD} ${_if} | grep 'inet6 ' | tr "\n" "$_ifs"`" + inetList="`${IFCONFIG_CMD} ${_if} | grep 'inet6 ' | tr "\n\t" "$_ifs"`" oldifs="$IFS" IFS="$_ifs" for _inet6 in $inetList ; do # get rid of extraneous line - [ -z "$_inet6" ] && break + case $_inet in + inet6\ *) ;; + *) continue ;; + esac _inet6=`expr "$_inet6" : '.*\(inet6 \([0-9a-f:]*\)\).*'` ----Next_Part(Thu_Sep__5_05_19_41_2013_886)---- ----Security_Multipart0(Thu_Sep__5_05_19_41_2013_357)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iEYEABECAAYFAlInld0ACgkQTyzT2CeTzy2zhgCfdR7QTcGQLIVQbY/1ppAt10Xf 6qoAn3TCX+dLv4j4EWXHAR98tt5cjeq9 =qXbL -----END PGP SIGNATURE----- ----Security_Multipart0(Thu_Sep__5_05_19_41_2013_357)----