aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-07-08 22:38:48 +0100
committerRoy Marples <roy@marples.name>2009-07-08 22:38:48 +0100
commit7962218dd85dcb4ebbd1f6fa01b565d129a258e2 (patch)
treea35efc7072e8f3d54367aa351ad4baeb76d3bcda
parent889b317ac6c12ec14ccfb43a7ef9156470cfa8e3 (diff)
Apply MTU and txqueuelen after creating the tunnel.
-rw-r--r--net/ifconfig.sh.Linux.in23
-rw-r--r--net/iproute2.sh20
2 files changed, 22 insertions, 21 deletions
diff --git a/net/ifconfig.sh.Linux.in b/net/ifconfig.sh.Linux.in
index 4fd24602..ae68b2b6 100644
--- a/net/ifconfig.sh.Linux.in
+++ b/net/ifconfig.sh.Linux.in
@@ -261,6 +261,17 @@ _tunnel()
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
local mtu=
eval mtu=\$mtu_${IFVAR}
@@ -271,17 +282,7 @@ ifconfig_pre_start()
eval len=\$txqueuelen_${IFVAR}
[ -n "${len}" ] && ifconfig "${IFACE}" txqueuelen "${len}"
- local tunnel=
-
- eval tunnel=\$iptunnel_${IFVAR}
- [ -z "${tunnel}" ] && return 0
-
- # Set our base metric to 1000
- metric=1000
-
- ebegin "Creating tunnel ${IFVAR}"
- iptunnel add ${tunnel}
- eend $?
+ return 0
}
ifconfig_post_stop()
diff --git a/net/iproute2.sh b/net/iproute2.sh
index 08a42664..b1fe8619 100644
--- a/net/iproute2.sh
+++ b/net/iproute2.sh
@@ -190,16 +190,6 @@ _tunnel()
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=
eval tunnel=\$iptunnel_${IFVAR}
if [ -n "${tunnel}" ]; then
@@ -212,6 +202,16 @@ iproute2_pre_start()
_up
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
}