network.subr vlan handling broken

Hiroki Sato hrs at FreeBSD.org
Fri Jun 20 03:56:15 UTC 2014


John Hay <jhay at meraka.org.za> wrote
  in <20140619103513.GA92393 at zibbi.meraka.csir.co.za>:

jh> Hi Guys,
jh>
jh> freebsd-rc did not react, so I'm just checking on -net too.
jh>
jh> I found after upgrading that vlan handling broke. I tried the following:
jh>
jh> vlans_bce1="6"
jh> ipv4_addrs_bce1_6="inet 10.239.100.2/24"
jh> ifconfig_bce1_6_aliases="inet 10.239.100.2/24"
jh> ifconfig_bce1_6_alias0="inet 10.239.100.2/24"
jh>
jh> I traced it down to ifalias_af_common_handler being called with the
jh> mangled interfcace name _if and it then calls ifconfig with it. Here
jh> is my fix. Any reason not to commit it? My diff is against 10-stable,
jh> but head looks the same.

 Can you try the attached patch?  It seemed broken after list_vars()
 was introduced.  Replacing $_if with $1 also fixes it, but $_if
 should be used for ifname as the other parts do.

jh> While looking through the code I saw that ltr is called with different
jh> styling. Is there a reason for it? Which is the prefered style?
jh>
jh> 	ltr ${_if} "${_punct}" '_' _if
jh> 	ltr "$_if" "$_punct" "_" _if

 I do not think there is a reason.

 I think there is no consensus about the style but I am using {} only
 when boundary between the variable name and the subsequent characters
 can be ambiguous.

-- Hiroki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: network.subr-20140620-1.diff
Type: text/x-patch
Size: 1418 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20140620/492b3fcb/attachment.bin>
-------------- 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-net/attachments/20140620/492b3fcb/attachment.sig>


More information about the freebsd-net mailing list