summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Lee <dlqs@gmx.com>2021-10-19 02:40:58 +0800
committerDonald Lee <dlqs@gmx.com>2021-10-20 00:56:00 +0800
commit461c173cbdb3d532e6824a4a22bbdec632b09a06 (patch)
treea817ffc6c12e532e3f416ecf18b20b162898911d
parent1247efcce494cc5c4c3bcd5d67b7b2f018d48fb5 (diff)
zebra: Add script initialization and destroy
Signed-off-by: Donald Lee <dlqs@gmx.com>
-rw-r--r--zebra/zebra_router.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/zebra/zebra_router.c b/zebra/zebra_router.c
index d930f59866..7215551f8d 100644
--- a/zebra/zebra_router.c
+++ b/zebra/zebra_router.c
@@ -255,6 +255,10 @@ void zebra_router_terminate(void)
hash_free(zrouter.ipset_entry_hash);
hash_clean(zrouter.iptable_hash, zebra_pbr_iptable_free);
hash_free(zrouter.iptable_hash);
+
+#ifdef HAVE_SCRIPTING
+ zebra_script_destroy();
+#endif
}
bool zebra_router_notify_on_ack(void)
@@ -296,4 +300,8 @@ void zebra_router_init(bool asic_offload, bool notify_on_ack)
zrouter.asic_offloaded = asic_offload;
zrouter.notify_on_ack = notify_on_ack;
+
+#ifdef HAVE_SCRIPTING
+ zebra_script_init();
+#endif
}