From f5d185e447417bb0490044474d25707012724d6d Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Wed, 21 Mar 2012 19:04:27 +0000 Subject: [PATCH] svc/tripe-ifup.in: Bring up the interface before adding routes. Organization: Straylight/Edgeware From: Mark Wooding It doesn't work the other way around. Except when I was testing it, for some reason. --- svc/tripe-ifup.in | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/svc/tripe-ifup.in b/svc/tripe-ifup.in index 8ca0c99c..4d4c5b7e 100644 --- a/svc/tripe-ifup.in +++ b/svc/tripe-ifup.in @@ -106,6 +106,25 @@ case $have6,$# in ;; esac +###-------------------------------------------------------------------------- +### Bring the interface up. + +case $haveaddr4,$haveaddr6 in + nil,nil) + ;; + *) + case "${P_MTU+set}" in + set) + mtu=$P_MTU;; + *) + pathmtu=$(pathmtu "$addr") + mtu=$(expr "$pathmtu" - 33 - $A_CIPHER_BLKSZ - $A_MAC_TAGSZ) + ;; + esac + ip link set dev "$ifname" up mtu "$mtu" + ;; +esac + ###-------------------------------------------------------------------------- ### Set up routing. @@ -138,25 +157,6 @@ case $haveaddr6,$# in ;; esac -###-------------------------------------------------------------------------- -### Bring the interface up. - -case $haveaddr4,$haveaddr6 in - nil,nil) - ;; - *) - case "${P_MTU+set}" in - set) - mtu=$P_MTU;; - *) - pathmtu=$(pathmtu "$addr") - mtu=$(expr "$pathmtu" - 33 - $A_CIPHER_BLKSZ - $A_MAC_TAGSZ) - ;; - esac - ip link set dev "$ifname" up mtu "$mtu" - ;; -esac - ###-------------------------------------------------------------------------- ### Maybe invoke a follow-on script. -- [mdw]