From f6c27abeb571d1025e2f2c7a53c734d21ad285cf Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Fri, 7 Oct 2011 21:45:46 +0000 Subject: net/vlan: respect txqueuelen/mac/broadcast/mtu options during creation. Signed-off-by: Robin H. Johnson --- net/vlan.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/net/vlan.sh b/net/vlan.sh index c7e57483..6eed36b9 100644 --- a/net/vlan.sh +++ b/net/vlan.sh @@ -77,7 +77,17 @@ vlan_post_start() eval vegress=\$vlan${vlan}_egress [ -z "${vegress}" ] || vegress="egress-qos-map ${vegress}" - e="$(ip link add link "${IFACE}" name "${vname}" type vlan id "${vlan}" ${vflags} ${vingress} ${vegress} 2>&1 1>/dev/null)" + local txqueuelen= + eval txqueuelen=\$txqueuelen_vlan${vlan} + local mac= + eval mac=\$mac_vlan${vlan} + local broadcast= + eval broadcast=\$broadcast_vlan${vlan} + local mtu= + eval mtu=\$mtu_vlan${vlan} + local opts="${txqueuelen:+txqueuelen} ${txqueuelen} ${mac:+address} ${mac} ${broadcast:+broadcast} ${broadcast} ${mtu+:mtu} ${mtu}" + + e="$(ip link add link "${IFACE}" name "${vname}" ${opts} type vlan id "${vlan}" ${vflags} ${vingress} ${vegress} 2>&1 1>/dev/null)" if [ -n "${e}" ]; then eend 1 "${e}" continue -- cgit v1.2.3