]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: On shutdown don't count removals
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 16 Feb 2018 02:33:22 +0000 (21:33 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 23 Feb 2018 12:08:36 +0000 (07:08 -0500)
Some of the tables are no longer stored in the zvrf
and in the zns now.  On shutdown zns is cleaned up
after vrf( and rightly so!) As such we should not
attempt to count the information if we don't have
a zvrf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/zebra_rib.c

index 967bc92850cb9d5282adf670fd15dc26ac77f009..b5ce17d9f82f9a2a746bec816b4bf01889839eb1 100644 (file)
@@ -1150,7 +1150,8 @@ void rib_uninstall_kernel(struct route_node *rn, struct route_entry *re)
         */
        hook_call(rib_update, rn, "uninstalling from kernel");
        kernel_route_rib(rn, p, src_p, re, NULL);
-       zvrf->removals++;
+       if (zvrf)
+               zvrf->removals++;
 
        return;
 }