From: Ismaƫl Bouya Date: Thu, 13 Feb 2020 09:29:12 +0000 (+0100) Subject: Fix concurrent ip6 addresses X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=bd3711f0bb5022f389e2cbe1110b185da700ee6d;p=perso%2FImmae%2FConfig%2Ftinc%2Fhosts.git Fix concurrent ip6 addresses --- diff --git a/ImmaeEu-down b/ImmaeEu-down index 8459778..638933f 100755 --- a/ImmaeEu-down +++ b/ImmaeEu-down @@ -4,9 +4,11 @@ [ -e /tmp/tinc_$NETNAME ] && . /tmp/tinc_$NETNAME [ -e /run/tinc_$NETNAME.vars ] && . /run/tinc_$NETNAME.vars rm -f /tmp/tinc_$NETNAME /run/tinc_$NETNAME.vars -[ -n "$GWIP" ] && ip -6 route del default via $GWIP +[ -n "$GWIP" ] && ip -6 route del default via $GWIP table 655 for MYIP in $MYIPS; do - ip -6 addr del $MYIP/96 dev $INTERFACE + ip -6 addr del $MYIP/80 dev $INTERFACE + ip -6 rule del from $MYIP/80 table 655 + ip -6 rule del to $MYIP/80 table 655 done ip -6 link set $INTERFACE down diff --git a/ImmaeEu-up b/ImmaeEu-up index c2dc93a..a3784aa 100755 --- a/ImmaeEu-up +++ b/ImmaeEu-up @@ -18,7 +18,9 @@ rm -f /run/tinc_$NETNAME.vars echo -e "MYIPS=\"$MYIPS\"\nGWIP=\"$GWIP\"" > /run/tinc_$NETNAME.vars ip -6 link set $INTERFACE up mtu 1280 for MYIP in $MYIPS; do - ip -6 addr add $MYIP/96 dev $INTERFACE + ip -6 addr add $MYIP/80 dev $INTERFACE + ip -6 rule add from $MYIP/80 table 655 + ip -6 rule add to $MYIP/80 table 655 done -ip -6 route add default via $GWIP +ip -6 route add default via $GWIP dev $INTERFACE table 655 (cd /etc/tinc/$NETNAME/hosts && git pull -q origin master) || true