Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jun 2014 20:33:31 +0200
From:      John Hay <jhay@meraka.org.za>
To:        freebsd-rc@freebsd.org
Subject:   network.subr vlan handling broken
Message-ID:  <20140601183330.GA12394@zibbi.meraka.csir.co.za>

next in thread | raw e-mail | index | archive | help
Hi Guys,

I found after upgrading that vlan handling broke. I tried the following:

vlans_bce1="6"
ipv4_addrs_bce1_6="inet 10.239.100.2/24"
ifconfig_bce1_6_aliases="inet 10.239.100.2/24"
ifconfig_bce1_6_alias0="inet 10.239.100.2/24"

I traced it down to ifalias_af_common_handler being called with the
mangled interfcace name _if and it then calls ifconfig with it. Here
is my fix. Any reason not to commit it? My diff is against 10-stable,
but head looks the same.

#################
--- /etc/network.subr.orig	2014-06-01 17:30:38.000000000 +0000
+++ /etc/network.subr	2014-06-01 18:03:08.030175024 +0000
@@ -1151,7 +1151,7 @@
 		inet|inet6|ipx|link|ether)
 			case $_tmpargs in
 			${_af}\ *)
-				eval ifalias_af_common_handler $_if $_af $_action $_tmpargs && _ret=0
+				eval ifalias_af_common_handler $1 $_af $_action $_tmpargs && _ret=0
 			;;
 			esac
 			_tmpargs=$_c
@@ -1163,7 +1163,7 @@
 	# Process the last component
 	case $_tmpargs in
 	${_af}\ *)
-		ifalias_af_common_handler $_if $_af $_action $_tmpargs && _ret=0
+		ifalias_af_common_handler $1 $_af $_action $_tmpargs && _ret=0
 	;;
 	esac
 
#################

While looking through the code I saw that ltr is called with different
styling. Is there a reason for it? Which is the prefered style?

	ltr ${_if} "${_punct}" '_' _if
	ltr "$_if" "$_punct" "_" _if

My own would be the first.

Regards

John
-- 
John Hay -- jhay@meraka.csir.co.za / jhay@meraka.org.za



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