if (zrouter.lsp_process_q)
work_queue_free_and_null(&zrouter.lsp_process_q);
- zebra_router_cleanup();
vrf_terminate();
ns_walk_func(zebra_ns_early_shutdown);
zebra_nhg_handle_uninstall(nhe);
}
-static void zebra_nhg_uninstall_created(struct hash_bucket *bucket, void *arg)
-{
- struct nhg_hash_entry *nhe = NULL;
-
- nhe = (struct nhg_hash_entry *)bucket->data;
-
- if (ZEBRA_NHG_CREATED(nhe))
- zebra_nhg_uninstall_kernel(nhe);
-}
-
-void zebra_nhg_cleanup_tables(struct hash *hash)
-{
- /*
- * TODO: These should only be uninstalled via route cleanup path?
- */
- return;
- hash_iterate(hash, zebra_nhg_uninstall_created, NULL);
-}
-
void zebra_nhg_dplane_result(struct zebra_dplane_ctx *ctx)
{
enum dplane_op_e op;
};
-void zebra_nhg_init(void);
-void zebra_nhg_terminate(void);
-
extern void nhg_connected_free(struct nhg_connected *dep);
extern struct nhg_connected *nhg_connected_new(struct nhg_hash_entry *nhe);
void zebra_nhg_install_kernel(struct nhg_hash_entry *nhe);
void zebra_nhg_uninstall_kernel(struct nhg_hash_entry *nhe);
-void zebra_nhg_cleanup_tables(struct hash *hash);
-
/* Forward ref of dplane update context type */
struct zebra_dplane_ctx;
void zebra_nhg_dplane_result(struct zebra_dplane_ctx *ctx);
hash_create_size(8, zebra_nhg_id_key, zebra_nhg_hash_id_equal,
"Zebra Router Nexthop Groups ID index");
}
-
-/**
- * zebra_router_cleanup() - Perform any cleanup actions before termination
- *
- * Right now this is just being used to clear the nexthops we installed in
- * the kernel on shutdown before the routes are cleaned via vrf_terminated().
- */
-void zebra_router_cleanup(void)
-{
- zebra_nhg_cleanup_tables(zrouter.nhgs_id);
-}