summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-06-01 03:47:30 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-06-01 03:49:17 +0200
commit9ee2f5741ded52bef8ee20406257bdce56c5ea19 (patch)
tree4d85943859bbd64fc31c9e336e0d49a6fca67fc6 /tools
parentMerge pull request #4435 from donaldsharp/zclient_buffer_sizing (diff)
downloadfrr-9ee2f5741ded52bef8ee20406257bdce56c5ea19.tar.xz
frr-9ee2f5741ded52bef8ee20406257bdce56c5ea19.zip
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 <sharpd@cumulusnetworks.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/frr.in25
1 files changed, 1 insertions, 24 deletions
diff --git a/tools/frr.in b/tools/frr.in
index d871afa42..50f7ecaa9 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