aboutsummaryrefslogtreecommitdiff
path: root/net/vlan.sh
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2011-10-07 21:45:46 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2011-10-07 21:47:46 +0000
commitf6c27abeb571d1025e2f2c7a53c734d21ad285cf (patch)
treee0b2f8e6400764b3f22326b11484a7202f5ae33e /net/vlan.sh
parent917553475227bdeab70f19edb7a4ea549a1abe8f (diff)
net/vlan: respect txqueuelen/mac/broadcast/mtu options during creation.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'net/vlan.sh')
-rw-r--r--net/vlan.sh12
1 files changed, 11 insertions, 1 deletions
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