Commit 5c08a93ad3 for frr
commit 5c08a93ad3c41c583621512d1b96d87dc611b065
Author: Nageswara Soma <nsoma@cisco.com>
Date: Mon Jun 15 12:30:28 2026 -0700
zebra: drain FPM MAC queue on module fini
Remove all pending fpm_mac_info_t entries from mac_q
during zfpm_fini so shutdown does not leak MAC tracking
state.
Signed-off-by: Nageswara Soma <nsoma@cisco.com>
diff --git a/zebra/zebra_fpm.c b/zebra/zebra_fpm.c
index 1cf6f00723..f835e2531c 100644
--- a/zebra/zebra_fpm.c
+++ b/zebra/zebra_fpm.c
@@ -2050,6 +2050,8 @@ static int zfpm_init(struct event_loop *master)
static int zfpm_fini(void)
{
+ struct fpm_mac_info_t *mac;
+
zfpm_write_off();
zfpm_read_off();
zfpm_connect_off();
@@ -2057,6 +2059,9 @@ static int zfpm_fini(void)
zfpm_stop_stats_timer();
+ while ((mac = TAILQ_FIRST(&zfpm_g->mac_q)) != NULL)
+ zfpm_mac_info_del(mac);
+
hook_unregister(rib_update, zfpm_trigger_update);
hook_unregister(zebra_rmac_update, zfpm_trigger_rmac_update);