Apply MTU and txqueuelen after creating the tunnel.
This commit is contained in:
parent
889b317ac6
commit
7962218dd8
@ -261,6 +261,17 @@ _tunnel()
|
|||||||
|
|
||||||
ifconfig_pre_start()
|
ifconfig_pre_start()
|
||||||
{
|
{
|
||||||
|
local tunnel=
|
||||||
|
eval tunnel=\$iptunnel_${IFVAR}
|
||||||
|
if [ -n "${tunnel}" ]; then
|
||||||
|
# Set our base metric to 1000
|
||||||
|
metric=1000
|
||||||
|
ebegin "Creating tunnel ${IFVAR}"
|
||||||
|
iptunnel add ${tunnel}
|
||||||
|
eend $? || return 1
|
||||||
|
_up
|
||||||
|
fi
|
||||||
|
|
||||||
# MTU support
|
# MTU support
|
||||||
local mtu=
|
local mtu=
|
||||||
eval mtu=\$mtu_${IFVAR}
|
eval mtu=\$mtu_${IFVAR}
|
||||||
@ -271,17 +282,7 @@ ifconfig_pre_start()
|
|||||||
eval len=\$txqueuelen_${IFVAR}
|
eval len=\$txqueuelen_${IFVAR}
|
||||||
[ -n "${len}" ] && ifconfig "${IFACE}" txqueuelen "${len}"
|
[ -n "${len}" ] && ifconfig "${IFACE}" txqueuelen "${len}"
|
||||||
|
|
||||||
local tunnel=
|
return 0
|
||||||
|
|
||||||
eval tunnel=\$iptunnel_${IFVAR}
|
|
||||||
[ -z "${tunnel}" ] && return 0
|
|
||||||
|
|
||||||
# Set our base metric to 1000
|
|
||||||
metric=1000
|
|
||||||
|
|
||||||
ebegin "Creating tunnel ${IFVAR}"
|
|
||||||
iptunnel add ${tunnel}
|
|
||||||
eend $?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ifconfig_post_stop()
|
ifconfig_post_stop()
|
||||||
|
@ -190,16 +190,6 @@ _tunnel()
|
|||||||
|
|
||||||
iproute2_pre_start()
|
iproute2_pre_start()
|
||||||
{
|
{
|
||||||
# MTU support
|
|
||||||
local mtu=
|
|
||||||
eval mtu=\$mtu_${IFVAR}
|
|
||||||
[ -n "${mtu}" ] && ip link set "${IFACE}" mtu "${mtu}"
|
|
||||||
|
|
||||||
# TX Queue Length support
|
|
||||||
local len=
|
|
||||||
eval len=\$txqueuelen_${IFVAR}
|
|
||||||
[ -n "${len}" ] && ip link set "${IFACE}" txqueuelen "${len}"
|
|
||||||
|
|
||||||
local tunnel=
|
local tunnel=
|
||||||
eval tunnel=\$iptunnel_${IFVAR}
|
eval tunnel=\$iptunnel_${IFVAR}
|
||||||
if [ -n "${tunnel}" ]; then
|
if [ -n "${tunnel}" ]; then
|
||||||
@ -212,6 +202,16 @@ iproute2_pre_start()
|
|||||||
_up
|
_up
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# MTU support
|
||||||
|
local mtu=
|
||||||
|
eval mtu=\$mtu_${IFVAR}
|
||||||
|
[ -n "${mtu}" ] && ip link set "${IFACE}" mtu "${mtu}"
|
||||||
|
|
||||||
|
# TX Queue Length support
|
||||||
|
local len=
|
||||||
|
eval len=\$txqueuelen_${IFVAR}
|
||||||
|
[ -n "${len}" ] && ip link set "${IFACE}" txqueuelen "${len}"
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user