From 7962218dd85dcb4ebbd1f6fa01b565d129a258e2 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 8 Jul 2009 22:38:48 +0100 Subject: Apply MTU and txqueuelen after creating the tunnel. --- net/ifconfig.sh.Linux.in | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'net/ifconfig.sh.Linux.in') diff --git a/net/ifconfig.sh.Linux.in b/net/ifconfig.sh.Linux.in index 4fd2460..ae68b2b 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() -- cgit v1.2.3