network.subr _aliasN handling
Hiroki Sato
hrs at FreeBSD.org
Mon Feb 24 04:00:32 UTC 2014
<dteske at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-rc/attachments/20140224/9fa4a3f8/attachment.sig>
More information about the freebsd-rc
mailing list