chiark / gitweb /
svc/tripe-ifup.in: Don't set remote IPv6 address until interface is up.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 8 Apr 2020 12:07:56 +0000 (13:07 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 8 Apr 2020 12:09:19 +0000 (13:09 +0100)
This is annoying.  Later Linux kernels complain about adding routes to
an interface which is still down.

svc/tripe-ifup.in

index 032142c5716f845e773db8357ac23e0a38ce0c90..80a315b753b3d7842d75c768c267252b3206b295 100644 (file)
@@ -119,9 +119,6 @@ case $have6,$# in
       try ip addr add "$a" dev "$ifname"
       haveaddr6=t
     done
-    case ${r6addr+set} in
-      set) try ip route add $r6addr proto static dev "$ifname" ;;
-    esac
     ;;
 esac
 
@@ -144,6 +141,18 @@ case $haveaddr4,$haveaddr6 in
     ;;
 esac
 
+###--------------------------------------------------------------------------
+### Set the peer IPv6 address if any.
+
+## IPv6 point-to-point links seem broken in Linux.  Attach the local and
+## remote addresses by hand.
+set -- $l6addr
+case $have6,$#,${r6addr+set} in
+  t,[1-9]*,set)
+    try ip route add $r6addr proto static dev "$ifname"
+    ;;
+esac
+
 ###--------------------------------------------------------------------------
 ### Set up routing.