From: Mark Wooding Date: Wed, 21 Mar 2012 19:04:27 +0000 (+0000) Subject: svc/tripe-ifup.in: Bring up the interface before adding routes. X-Git-Tag: 1.0.0pre11~22 X-Git-Url: https://git.distorted.org.uk/~mdw/tripe/commitdiff_plain/f5d185e447417bb0490044474d25707012724d6d svc/tripe-ifup.in: Bring up the interface before adding routes. It doesn't work the other way around. Except when I was testing it, for some reason. --- 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 @@ -107,6 +107,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. ## Split the routes into v4 and v6 lists. @@ -139,25 +158,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. case "${P_IFUPEXTRA+set}" in