diff --git a/lib/route.bash b/lib/route.bash index 103874e..0893585 100644 --- a/lib/route.bash +++ b/lib/route.bash @@ -7,8 +7,8 @@ add_route4() { if has route; then if [[ "$OSTYPE" == "linux-gnu" ]]; then - route del -net "$subnet" "$gateway" netmask "$netmask" "$interface" || true - route add -net "$subnet" "$gateway" netmask "$netmask" "$interface" + route -n del -net "$subnet" "$gateway" netmask "$netmask" "$interface" || true + route -n add -net "$subnet" "$gateway" netmask "$netmask" "$interface" else route -n del -net "$subnet/$prefixlen" "$gateway" || true route -n add -net "$subnet/$prefixlen" "$gateway" @@ -29,8 +29,8 @@ add_route6() { if has route; then if [[ "$OSTYPE" == "linux-gnu" ]]; then - route del -A inet6 "$subnet/$prefixlen" gw "$gateway" "$interface" || true - route add -A inet6 "$subnet/$prefixlen" gw "$gateway" "$interface" + route -n del -A inet6 "$subnet/$prefixlen" gw "$gateway" "$interface" || true + route -n add -A inet6 "$subnet/$prefixlen" gw "$gateway" "$interface" else if [[ "$gateway" == fe80* ]]; then gateway="$gateway%$interface" diff --git a/tinc-up b/tinc-up index e9008ca..7c6d257 100755 --- a/tinc-up +++ b/tinc-up @@ -52,8 +52,8 @@ ula_ip6="$(format_ip6_from_mac $ULA_IP6_TEMPLATE $MAC_ADDRESS)" add_ip6 "$INTERFACE" "$public_ip6" "80" add_ip6 "$INTERFACE" "$ula_ip6" "64" -add_route6 "$INTERFACE" "fc00::" "fe80::1" "7" -add_route6 "$INTERFACE" "fc00::" "fe80::1" "7" +add_route6 "$INTERFACE" "fc00::" "fe80::3" "7" +add_route6 "$INTERFACE" "$PUBLIC_IP6_PREFIX::" "fe80::3" "64" if [ -n "$SUBNET" ]; then IFS=' ' read ip netmask <<< "$SUBNET"