From owner-svn-src-stable-9@FreeBSD.ORG Wed Jul 23 22:10:35 2014 Return-Path: Delivered-To: svn-src-stable-9@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 ESMTPS id 048C0B23; Wed, 23 Jul 2014 22:10:35 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBE342FF4; Wed, 23 Jul 2014 22:10:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6NMAYNZ015821; Wed, 23 Jul 2014 22:10:34 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6NMAYAx015820; Wed, 23 Jul 2014 22:10:34 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201407232210.s6NMAYAx015820@svn.freebsd.org> From: Devin Teske Date: Wed, 23 Jul 2014 22:10:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269028 - stable/9/etc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 22:10:35 -0000 Author: dteske Date: Wed Jul 23 22:10:34 2014 New Revision: 269028 URL: http://svnweb.freebsd.org/changeset/base/269028 Log: MFC r267812 (hrs): Fix ifname normalization. ifconfig_IF_alias{es,N} did not work if ifname has any of [.-/+]. PR: conf/191961 Spotted by: jhay MFC after: 3 days Modified: stable/9/etc/network.subr Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/network.subr ============================================================================== --- stable/9/etc/network.subr Wed Jul 23 21:08:04 2014 (r269027) +++ stable/9/etc/network.subr Wed Jul 23 22:10:34 2014 (r269028) @@ -1011,7 +1011,7 @@ ifalias_af_common_handler() ifalias_af_common() { local _ret _if _af _action alias ifconfig_args _aliasn _c _tmpargs _iaf - local _punct=".-/+" + local _vif _punct=".-/+" _ret=1 _aliasn= @@ -1020,11 +1020,11 @@ ifalias_af_common() _action=$3 # Normalize $_if before using it in a pattern to list_vars() - ltr "$_if" "$_punct" "_" _if + ltr "$_if" "$_punct" "_" _vif # ifconfig_IF_aliasN which starts with $_af - for alias in `list_vars ifconfig_${_if}_alias[0-9]\* | - sort_lite -nk1.$((9+${#_if}+7))` + for alias in `list_vars ifconfig_${_vif}_alias[0-9]\* | + sort_lite -nk1.$((9+${#_vif}+7))` do eval ifconfig_args=\"\$$alias\" _iaf= @@ -1053,8 +1053,8 @@ ifalias_af_common() # backward compatibility: ipv6_ifconfig_IF_aliasN. case $_af in inet6) - for alias in `list_vars ipv6_ifconfig_${_if}_alias[0-9]\* | - sort_lite -nk1.$((14+${#_if}+7))` + for alias in `list_vars ipv6_ifconfig_${_vif}_alias[0-9]\* | + sort_lite -nk1.$((14+${#_vif}+7))` do eval ifconfig_args=\"\$$alias\" case ${_action}:"${ifconfig_args}" in @@ -1063,8 +1063,8 @@ ifalias_af_common() ;; alias:*) _aliasn="${_aliasn} inet6 ${ifconfig_args}" - warn "\$ipv6_ifconfig_${_if}_alias${alias} " \ - "is obsolete. Use ifconfig_$1_aliasN " \ + warn "\$ipv6_ifconfig_${_vif}_alias${alias} " \ + "is obsolete. Use ifconfig_${_vif}_aliasN " \ "instead." ;; esac