Date: Tue, 24 Jun 2014 09:50:46 +0200 From: John Hay <jhay@meraka.org.za> To: Hiroki Sato <hrs@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r267812 - head/etc Message-ID: <20140624075045.GA53292@zibbi.meraka.csir.co.za> In-Reply-To: <201406240437.s5O4baoe064856@svn.freebsd.org> References: <201406240437.s5O4baoe064856@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Hiroki, Thanks for committing it. Will you also be merging it to 10? That is where I picked up the problem first. I see there was a bug filed over the weekend that looks like it might be the same problem: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191252 Regards John -- John Hay -- jhay@meraka.csir.co.za / jhay@meraka.org.za / jhay@FreeBSD.org On Tue, Jun 24, 2014 at 04:37:36AM +0000, Hiroki Sato wrote: > Author: hrs > Date: Tue Jun 24 04:37:36 2014 > New Revision: 267812 > URL: http://svnweb.freebsd.org/changeset/base/267812 > > Log: > Fix ifname normalization. ifconfig_IF_alias{es,N} did not work if ifname has > any of [.-/+]. > > Spotted by: jhay > > Modified: > head/etc/network.subr > > Modified: head/etc/network.subr > ============================================================================== > --- head/etc/network.subr Tue Jun 24 02:02:51 2014 (r267811) > +++ head/etc/network.subr Tue Jun 24 04:37:36 2014 (r267812) > @@ -1077,7 +1077,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= > @@ -1086,11 +1086,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= > @@ -1118,8 +1118,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 > @@ -1129,7 +1129,7 @@ ifalias_af_common() > alias:*) > _aliasn="${_aliasn} inet6 ${ifconfig_args}" > warn "\$${alias} is obsolete. " \ > - "Use ifconfig_$1_aliasN instead." > + "Use ifconfig_${_vif}_aliasN instead." > ;; > esac > done
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140624075045.GA53292>