chiark / gitweb /
svc/tripe-ifup.in: Bring up the interface before adding routes.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 21 Mar 2012 19:04:27 +0000 (19:04 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 21 Mar 2012 19:04:27 +0000 (19:04 +0000)
It doesn't work the other way around.  Except when I was testing it, for
some reason.

svc/tripe-ifup.in

index 8ca0c99c703e47cc6f6dec9c960caf28fd0b2d8a..4d4c5b7eabf381b5900c4c10ef8cba0a38879409 100644 (file)
@@ -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.