bugfix wit-gc: changing the way to quickly add the blackhole route. this way it does not get advertised over BGP (it's considered invalid) and so it doesn't create any hickups if the same route would already be used somewhere else

This commit is contained in:
toby 2019-03-11 19:30:52 +00:00
parent 73ae7b9680
commit eeb6cedbf6
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ done
for route in $(vtysh -c "show ip route kernel" | grep 'unknown inactive' | sed 's|.* \([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\/[0-9]\{1,3\}\) \[.\/\([0-9]\{1,3\}\)\].*|\1-met-\2|')
do
echo "removing zombie route: ${route/-met-/ metric }"
ip route add blackhole ${route/-met-/ metric }
ip route add ${route/-met-/ via 127.1.1.1 metric }
ip route del ${route/-met-/ metric }
done