summaryrefslogtreecommitdiff
path: root/zebra/zebra_gr.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-03-24 14:16:49 -0400
committerDonald Sharp <sharpd@nvidia.com>2023-03-29 07:48:42 -0400
commit310ee917181873cafeff719262d58e1e67135c74 (patch)
tree6d7657db9ccf7bf9626d7efedb1d45bb256b8472 /zebra/zebra_gr.c
parentfbdc605778b208f20a1b817fc710542760bb3b75 (diff)
zebra: Just set the variable for what is wanted in GR code
The info->do_delete variable was being set to true only when u.val was 1. The problem with this is that u.val is a union and the various ways that we can call this event causes different values to be written to the union value on the thread. This makes no sense. Just set the variable to what we want it to be when we need it to be true. Since it was only ever set during a thread_execute section. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zebra_gr.c')
-rw-r--r--zebra/zebra_gr.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/zebra/zebra_gr.c b/zebra/zebra_gr.c
index 96d598f7c4..3a2351348e 100644
--- a/zebra/zebra_gr.c
+++ b/zebra/zebra_gr.c
@@ -82,11 +82,12 @@ void zebra_gr_stale_client_cleanup(struct list *client_list)
if (info->t_stale_removal != NULL) {
EVENT_OFF(info->t_stale_removal);
info->t_stale_removal = NULL;
+ info->do_delete = true;
/* Process the stale routes */
event_execute(
zrouter.master,
zebra_gr_route_stale_delete_timer_expiry,
- info, 1);
+ info, 0);
}
}
}
@@ -470,10 +471,6 @@ static void zebra_gr_route_stale_delete_timer_expiry(struct event *thread)
client = (struct zserv *)info->stale_client_ptr;
- /* Set the flag to indicate all stale route deletion */
- if (thread->u.val == 1)
- info->do_delete = true;
-
cnt = zebra_gr_delete_stale_routes(info);
/* Restart the timer */
@@ -693,6 +690,7 @@ static void zebra_gr_process_client_stale_routes(struct zserv *client,
__func__, zebra_route_string(client->proto),
VRF_LOGNAME(vrf), info->vrf_id);
EVENT_OFF(info->t_stale_removal);
+ info->do_delete = false;
event_execute(zrouter.master,
zebra_gr_route_stale_delete_timer_expiry, info,
0);