From: Ian Kelling Date: Tue, 8 Sep 2020 20:08:13 +0000 (-0400) Subject: revert mail route ipv6 test X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=a392eab9d4442d86e177356c776908a4579a050e;p=distro-setup revert mail route ipv6 test --- diff --git a/mail-route b/mail-route index 60d95d6..2aecfaa 100755 --- a/mail-route +++ b/mail-route @@ -156,32 +156,12 @@ modify() { exists=true; ip -6 route show $iproutecmd | grep . &>/dev/null || exists=false if runtest; then e ip -6 route $ip_op $iproutecmd; fi - - # Previously, I tried setting a default route with metric 6000, so - # that generally an isp assigned route would have lower metric and - # take precedence. The problem is that with linux SLAAC, it then - # stops assigning any default routes after the existing one - # expires. I can't find any way to get SLAAC to reassign the route - # other than rebooting. things i tried: googling. checking ipv6 - # sysctl settings, they are all unchanged. The next thing I would - # need to do seems to be looking at the kernel source code. I dun - # wanna delve into that. - - haveipv6=false - if [[ $(ip -6 r show default) ]]; then - haveipv6=true - fi - - runtestipv6() { - runtest && { $stop || ! $haveipv6; } - } - - iproutecmd="::/1 dev $tun_dev" - exists=true; ip -6 route show $iproutecmd | grep . &>/dev/null || exists=false - if runtestipv6; then e ip -6 route $ip_op $iproutecmd; fi - iproutecmd="8000::/1 dev $tun_dev" + # We could only do this if we dont have a default route with [[ ! $(ip -6 r show default) ]] but + # metric seems to be perfectly good. 6000 because on my home comp, + # its about 6 times slower to ping google, than the default 1024 metric. + iproutecmd="default dev $tun_dev" exists=true; ip -6 route show $iproutecmd | grep . &>/dev/null || exists=false - if runtestipv6; then e ip -6 route $ip_op $iproutecmd; fi + if runtest; then e ip -6 route $ip_op $iproutecmd metric 6000; fi fi # on debian this is 0 (no filter), on ubuntu it\'s 1, which is no good. 0 or 2 both work fine. # 2 drops it if the packet is not routable, martian address, or my default route is screwed up,