summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2021-01-15 06:55:29 -0500
committerGitHub <noreply@github.com>2021-01-15 06:55:29 -0500
commitf7f52f0d2b2c7f3e8187fb9d02a077660f1f60e2 (patch)
tree443eaaff6609441884d2c5fbfc2df3c3f83f8571
parenta3dd2d8d9f878be795b16ad8d0793e2c996fa3ce (diff)
parentef1dbba83a962af8868f483a69e312be8c4a412f (diff)
Merge pull request #7868 from mjstapp/fix_fpm_conn_up
zebra: don't set connection-up event pointer directly
-rw-r--r--zebra/zebra_fpm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/zebra/zebra_fpm.c b/zebra/zebra_fpm.c
index 8f5e7e8574..18ccbb79fb 100644
--- a/zebra/zebra_fpm.c
+++ b/zebra/zebra_fpm.c
@@ -522,8 +522,6 @@ static int zfpm_conn_up_thread_cb(struct thread *thread)
struct zfpm_rnodes_iter *iter;
rib_dest_t *dest;
- zfpm_g->t_conn_up = NULL;
-
iter = &zfpm_g->t_conn_up_state.iter;
if (zfpm_g->state != ZFPM_STATE_ESTABLISHED) {
@@ -557,7 +555,6 @@ static int zfpm_conn_up_thread_cb(struct thread *thread)
zfpm_g->stats.t_conn_up_yields++;
zfpm_rnodes_iter_pause(iter);
- zfpm_g->t_conn_up = NULL;
thread_add_timer_msec(zfpm_g->master, zfpm_conn_up_thread_cb,
NULL, 0, &zfpm_g->t_conn_up);
return 0;
@@ -585,13 +582,13 @@ static void zfpm_connection_up(const char *detail)
/*
* Start thread to push existing routes to the FPM.
*/
- assert(!zfpm_g->t_conn_up);
+ thread_cancel(&zfpm_g->t_conn_up);
zfpm_rnodes_iter_init(&zfpm_g->t_conn_up_state.iter);
zfpm_g->fpm_mac_dump_done = false;
zfpm_debug("Starting conn_up thread");
- zfpm_g->t_conn_up = NULL;
+
thread_add_timer_msec(zfpm_g->master, zfpm_conn_up_thread_cb, NULL, 0,
&zfpm_g->t_conn_up);
zfpm_g->stats.t_conn_up_starts++;