From 9ee2f5741ded52bef8ee20406257bdce56c5ea19 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 31 May 2019 21:47:30 -0400 Subject: [PATCH] tools: On shutdown no need to flush from tools/frr.in script Zebra already flushes routes on proper shutdown if you are not using the -K option. If you are using the -K option then you do not want the tools/frr script to flush routes. If zebra crashes and we restart then load up will either delete the routes or leave them depending on the -K option. Signed-off-by: Donald Sharp --- tools/frr.in | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/tools/frr.in b/tools/frr.in index d871afa42b..50f7ecaa9f 100755 --- a/tools/frr.in +++ b/tools/frr.in @@ -561,30 +561,7 @@ case "$1" in stop_prio 0 $dmn fi - if [ -z "$dmn" -o "$dmn" = "zebra" ]; then - echo "Removing all routes made by FRR." - # Specific values for each proto can be found - # in /etc/iproute2/rt_protos as well as FRR - # specific ones in /etc/iproute2/rt_protos.d - # Additionally if a new protocol is added - # we need to add it here as well as - # in rt_netlink.h( follow the directions! ) - ip route flush proto 4 - ip route flush proto 11 - ip route flush proto 42 - ip route flush proto 186 - ip route flush proto 187 - ip route flush proto 188 - ip route flush proto 189 - ip route flush proto 190 - ip route flush proto 191 - ip route flush proto 192 - ip route flush proto 193 - ip route flush proto 194 - ip route flush proto 195 - ip route flush proto 196 - ip route flush proto 197 - else + if [ [ -n "$dmn" ] && [ "$dmn" != "zebra" ] ]; then [ -n "$dmn" ] && eval "${dmn/-/_}=0" start_watchfrr fi -- 2.39.5