summaryrefslogtreecommitdiff
path: root/zebra/rib.h
diff options
context:
space:
mode:
authoranlan_cs <vic.lan@pica8.com>2022-09-24 19:00:14 -0400
committeranlan_cs <vic.lan@pica8.com>2022-09-24 19:39:58 -0400
commit0d0f516c76eef90d2f9e0e5c4d1472b78b24991c (patch)
tree16a74d5de482d5c9b9067df26f2295a275c5e57e /zebra/rib.h
parent344d81ceedd37702503baceece3acb1cde788018 (diff)
zebra: fix fpm crash
Fix issue#11996. When removing VRF ( all routes of this VRF), zebra mistakenly forgot to check whether its routes are in update queue of FPM. So FPM module will crash during its dealing with these routes, which are already freed. Add a new HOOK `rib_shutdown()`, `zebra_rtable_node_cleanup()` will use it to remove these routes from update queue of FPM module before freeing them. Signed-off-by: anlan_cs <vic.lan@pica8.com>
Diffstat (limited to 'zebra/rib.h')
-rw-r--r--zebra/rib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/zebra/rib.h b/zebra/rib.h
index dec5b2b8d6..99f52bcd4e 100644
--- a/zebra/rib.h
+++ b/zebra/rib.h
@@ -585,6 +585,7 @@ static inline void rib_tables_iter_cleanup(rib_tables_iter_t *iter)
DECLARE_HOOK(rib_update, (struct route_node * rn, const char *reason),
(rn, reason));
+DECLARE_HOOK(rib_shutdown, (struct route_node * rn), (rn));
/*
* Access installed/fib nexthops, which may be a subset of the