]> git.puffer.fish Git - mirror/frr.git/commitdiff
redhat: Make the init script flush routes for all associated protocols on stop
authorBrian Rak <brianrak@gameservers.com>
Tue, 25 Jul 2017 19:48:02 +0000 (15:48 -0400)
committerBrian Rak <brianrak@gameservers.com>
Tue, 25 Jul 2017 19:51:30 +0000 (15:51 -0400)
redhat/frr.init

index cf01e4c6e3291a9b3452c1498f329d4d4d1054f4..a62647b258756aea0afd72f088a776affd6cd5f2 100755 (executable)
@@ -515,6 +515,18 @@ case "$1" in
         if [ -z "$dmn" -o "$dmn" = "zebra" ]; then
             echo "Removing all routes made by zebra."
             ip route flush proto zebra
+            # At least in CentOS/RHEL 6, iproute2 doesn't know
+            # about the new protocol names, so we have to flush them
+            # by number (it also doesn't support rt_protos.d
+            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
         else
             [ -n "$dmn" ] && eval "${dmn/-/_}=0"
             start_watchfrr