From: Mark Wooding Date: Mon, 22 Dec 2014 20:32:58 +0000 (+0000) Subject: svc/tripe-ifup.in: Trim prefix length from IPv6 address used as gateway. X-Git-Tag: 1.0.0pre16.2~3 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/tripe/commitdiff_plain/5b968d5e4aa26455c3ac7ac9fa3824c254994232 svc/tripe-ifup.in: Trim prefix length from IPv6 address used as gateway. Because IPv6 doesn't deal with point-to-point connections well, it's common to use little networks. But then the user needs to associate a prefix length with the address, and we have to strip it off when adding routes which use the address as a gateway. --- diff --git a/svc/tripe-ifup.in b/svc/tripe-ifup.in index 79f5d469..ae447db8 100644 --- a/svc/tripe-ifup.in +++ b/svc/tripe-ifup.in @@ -152,7 +152,7 @@ set -- $route6 case $haveaddr6,$# in t,[1-9]*) for p in "$@"; do - ip route add $p proto static via "$r6addr" + ip route add $p proto static via "${r6addr%/*}" done ;; esac