tools: Fix route flush

This commit does two things:

1) Flush by proto number not string
   This is useful because not all systems might have the proto
   values installed, or a version of iproute2 that they might
   be installed with.
2) Flush missing routes that might have been installed( eigrp
   and nhrp )

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2017-09-25 19:10:40 -04:00
parent c1c41b0458
commit a6487ff6b5

View File

@ -544,13 +544,15 @@ case "$1" in
if [ -z "$dmn" -o "$dmn" = "zebra" ]; then
echo "Removing all routes made by FRR."
ip route flush proto bgp
ip route flush proto ospf
ip route flush proto static
ip route flush proto rip
ip route flush proto ripng
ip route flush proto zebra
ip route flush proto isis
ip route flush proto 186
ip route flush proto 188
ip route flush proto 4
ip route flush proto 189
ip route flush proto 190
ip route flush proto 11
ip route flush proto 187
ip route flush proto 192
ip route flush proto 194
else
[ -n "$dmn" ] && eval "${dmn/-/_}=0"