diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2023-05-22 15:46:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-22 15:46:29 +0200 |
| commit | 4d7f6295c6487b438d50280c1d7ddfe490d4749c (patch) | |
| tree | 183abc2ff218d0fd823acc1e64add9a097a37d2c /zebra/zebra_fpm.c | |
| parent | 884b0a21f9a2064eff91e75f79eb53b4b3e74444 (diff) | |
| parent | 5ec001aa53827236cd194ef631e59d04b429ac30 (diff) | |
Merge pull request #13560 from donaldsharp/fpm_netlink_aroni
Diffstat (limited to 'zebra/zebra_fpm.c')
| -rw-r--r-- | zebra/zebra_fpm.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/zebra/zebra_fpm.c b/zebra/zebra_fpm.c index e379a5868c..699f3ed110 100644 --- a/zebra/zebra_fpm.c +++ b/zebra/zebra_fpm.c @@ -497,6 +497,11 @@ static inline void zfpm_connect_off(void) EVENT_OFF(zfpm_g->t_connect); } +static inline void zfpm_conn_down_off(void) +{ + EVENT_OFF(zfpm_g->t_conn_down); +} + /* * zfpm_conn_up_thread_cb * @@ -635,8 +640,6 @@ static void zfpm_conn_down_thread_cb(struct event *thread) while ((mac = TAILQ_FIRST(&zfpm_g->mac_q)) != NULL) zfpm_mac_info_del(mac); - zfpm_g->t_conn_down = NULL; - iter = &zfpm_g->t_conn_down_state.iter; while ((rnode = zfpm_rnodes_iter_next(iter))) { @@ -667,7 +670,6 @@ static void zfpm_conn_down_thread_cb(struct event *thread) zfpm_g->stats.t_conn_down_yields++; zfpm_rnodes_iter_pause(iter); - zfpm_g->t_conn_down = NULL; event_add_timer_msec(zfpm_g->master, zfpm_conn_down_thread_cb, NULL, 0, &zfpm_g->t_conn_down); return; @@ -712,7 +714,7 @@ static void zfpm_connection_down(const char *detail) */ assert(!zfpm_g->t_conn_down); zfpm_rnodes_iter_init(&zfpm_g->t_conn_down_state.iter); - zfpm_g->t_conn_down = NULL; + zfpm_conn_down_off(); event_add_timer_msec(zfpm_g->master, zfpm_conn_down_thread_cb, NULL, 0, &zfpm_g->t_conn_down); zfpm_g->stats.t_conn_down_starts++; @@ -2042,10 +2044,13 @@ static int zfpm_fini(void) zfpm_write_off(); zfpm_read_off(); zfpm_connect_off(); + zfpm_conn_down_off(); zfpm_stop_stats_timer(); hook_unregister(rib_update, zfpm_trigger_update); + hook_unregister(zebra_rmac_update, zfpm_trigger_rmac_update); + return 0; } |
