chiark / gitweb /
svc/tripe-ifup.in: Allow netmasks on local and remote inside addresses.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 19 Apr 2014 13:28:58 +0000 (14:28 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 19 Apr 2014 13:35:00 +0000 (14:35 +0100)
This is necessary to allow IPv6 hosts to be in little subnets of their
own, which in turn lets us work around a stupid bug in Linux's IPv6
route caching and path-MTU handling.

svc/tripe-ifup.8.in
svc/tripe-ifup.in

index 440c284247e0bde114e0351bfcb15c3fd2b31f29..2b500412aeba6a344776d637b5daa95c93f67d9e 100644 (file)
@@ -103,16 +103,15 @@ performed using the new interface name.
 .hP 2.
 Configure the interface addresses.  If
 .I laddr
-is set, it should be a space-separated list of IPv4 and IPv6 addresses:
-there may be any number of either.
-If
+is set, it should be a space-separated list of IPv4 and IPv6 addresses
+with optional prefix lengths; there may be any number of either.  If
 .I raddr
-is set, it should be an IPv4 and/or an IPv6 address, separated by space:
-these are the addresses to configure as the remote end point of the
-point-to-point link.  (Further remote addresses can be configured as
-host routes: see below.)  IPv4 addresses are expected to be in
-dotted-quad form; IPv6 addresses should be in RFC4291 hex-and-colons
-form.
+is set, it should be a list IPv4 and/or an IPv6 addresses, with optional
+prefix lengths, separated by space: these are the addresses to
+configure as the remote end point of the point-to-point link.  (Further
+remote addresses can be configured as host routes: see below.)  IPv4
+addresses are expected to be in dotted-quad form; IPv6 addresses should
+be in RFC4291 hex-and-colons form.
 .hP 3.
 Establish routes.  If addresses were configured, and
 .I nets
index 059c250b14f9a4f93c69a4a2e643992122c97dbb..5f70ca1b265a89d876f337e54ecb1241d2922bcb 100644 (file)
@@ -53,7 +53,7 @@ case "${P_IFNAME+set}" in
 esac
 
 ###--------------------------------------------------------------------------
-### Configure the point-to-point link.
+### Configure the link.
 
 ## Split local addresses into v4 and v6 lists.
 unset l4addr l6addr
@@ -86,7 +86,7 @@ case $#,${r4addr+set} in
     ;;
 esac
 for a in "$@"; do
-  ip addr add "$a/32" dev "$ifname"
+  ip addr add "$a" dev "$ifname"
   haveaddr4=t
 done
 
@@ -97,11 +97,11 @@ set -- $l6addr
 case $have6,$# in
   t,[1-9]*)
     for a in "$@"; do
-      ip addr add "$a/128" dev "$ifname"
+      ip addr add "$a" dev "$ifname"
       haveaddr6=t
     done
     case ${r6addr+set} in
-      set) ip route add $r6addr/128 proto static dev "$ifname" ;;
+      set) ip route add $r6addr proto static dev "$ifname" ;;
     esac
     ;;
 esac