Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Feb 2014 12:59:55 +0900 (JST)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        dteske@FreeBSD.org
Cc:        jhellenthal@dataix.net, rc@FreeBSD.org
Subject:   Re: network.subr _aliasN handling
Message-ID:  <20140224.125955.1719844232391066.hrs@allbsd.org>
In-Reply-To: <122101cf2f94$bfd81b30$3f885190$@FreeBSD.org>
References:  <11c101cf2f6b$e3aee5d0$ab0cb170$@FreeBSD.org> <20140222.141935.520275210006153242.hrs@allbsd.org> <122101cf2f94$bfd81b30$3f885190$@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
----Security_Multipart(Mon_Feb_24_12_59_55_2014_506)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

<dteske@FreeBSD.org> wrote
  in <122101cf2f94$bfd81b30$3f885190$@FreeBSD.org>:

dt> > +list_vars()
dt> > +{
dt> > +	set | { while read LINE; do
dt> > +		var="${LINE%%=*}"
dt> > +		case "$var" in
dt> > +		"$LINE"|*[!a-zA-Z0-9_]*) continue ;;
dt> > +		$1) echo $var
dt> > +		esac
dt> > +	done; }
dt> > +}
dt> >
dt> >  This can be inconsistent with normalization of $_if in get_if_var()  when
dt> [.-/+]
dt> > is included.
dt> >
dt> [Devin Teske]
dt>
dt> I'm not sure what you mean by "when [.-/+] is included". The line of code

 get_if_var() normalizes IF part in the variable name before eval:

 |       _if=$1
 |       _punct=". - / +"
 |       for _punct_c in $_punct; do
 |               _if=`ltr ${_if} ${_punct_c} '_'`
 |       done

 while list_vars ifconfig_${_if}_alias[0-9]\* does not.

 I think this breaks the following configuration, for example:

 ifconfig_bge0_name="ext.1"
 ifconfig_ext_1="inet 192.168.0.1/24"
 ifconfig_ext_1_alias0="inet 192.168.1.1/24"

-- Hiroki

----Security_Multipart(Mon_Feb_24_12_59_55_2014_506)--
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEABECAAYFAlMKw7sACgkQTyzT2CeTzy29hQCglSgjtkhnYxDkK7Lp2NskYiia
2JQAoI4XPAEzworkzwA/ogNY0GnOpDZU
=Lwi5
-----END PGP SIGNATURE-----

----Security_Multipart(Mon_Feb_24_12_59_55_2014_506)----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140224.125955.1719844232391066.hrs>