From: Donatas Abraitis Date: Thu, 7 Oct 2021 10:25:43 +0000 (+0300) Subject: ospf6d: Do not explicitly set the thread pointer to NULL X-Git-Tag: base_8.2~347^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=d573b8f8639350cfa1edeec6b8e1cd422008ea77;p=mirror%2Ffrr.git ospf6d: Do not explicitly set the thread pointer to NULL FRR should only ever use the appropriate THREAD_ON/THREAD_OFF semantics. This is espacially true for the functions we end up calling the thread for. Signed-off-by: Donatas Abraitis --- diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 733f4ba1fb..cd2791fc48 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -204,7 +204,6 @@ int ospf6_orig_as_external_lsa(struct thread *thread) uint32_t type, adv_router; oi = (struct ospf6_interface *)THREAD_ARG(thread); - oi->thread_as_extern_lsa = NULL; if (oi->state == OSPF6_INTERFACE_DOWN) return 0; @@ -1091,8 +1090,6 @@ static int ospf6_asbr_routemap_update_timer(struct thread *thread) struct ospf6_redist *red; int type; - ospf6->t_distribute_update = NULL; - for (type = 0; type < ZEBRA_ROUTE_MAX; type++) { red = ospf6_redist_lookup(ospf6, type, 0); @@ -3372,7 +3369,6 @@ static int ospf6_asbr_summary_process(struct thread *thread) struct ospf6 *ospf6 = THREAD_ARG(thread); int operation = 0; - ospf6->t_external_aggr = NULL; operation = ospf6->aggr_action; if (IS_OSPF6_DEBUG_AGGR) diff --git a/ospf6d/ospf6_gr_helper.c b/ospf6d/ospf6_gr_helper.c index ad8998b1ed..78f842db6c 100644 --- a/ospf6d/ospf6_gr_helper.c +++ b/ospf6d/ospf6_gr_helper.c @@ -202,8 +202,6 @@ static int ospf6_handle_grace_timer_expiry(struct thread *thread) { struct ospf6_neighbor *nbr = THREAD_ARG(thread); - nbr->gr_helper_info.t_grace_timer = NULL; - ospf6_gr_helper_exit(nbr, OSPF6_GR_HELPER_GRACE_TIMEOUT); return OSPF6_SUCCESS; } diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c index 2d82ff7ce8..6abc1c7d09 100644 --- a/ospf6d/ospf6_intra.c +++ b/ospf6d/ospf6_intra.c @@ -248,7 +248,6 @@ int ospf6_router_lsa_originate(struct thread *thread) int count; oa = (struct ospf6_area *)THREAD_ARG(thread); - oa->thread_router_lsa = NULL; if (oa->ospf6->gr_info.restart_in_progress) { if (IS_DEBUG_OSPF6_GR) @@ -533,7 +532,6 @@ int ospf6_network_lsa_originate(struct thread *thread) uint16_t type; oi = (struct ospf6_interface *)THREAD_ARG(thread); - oi->thread_network_lsa = NULL; /* The interface must be enabled until here. A Network-LSA of a disabled interface (but was once enabled) should be flushed @@ -784,7 +782,6 @@ int ospf6_link_lsa_originate(struct thread *thread) struct ospf6_prefix *op; oi = (struct ospf6_interface *)THREAD_ARG(thread); - oi->thread_link_lsa = NULL; assert(oi->area); @@ -1030,7 +1027,6 @@ int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread) int ls_id = 0; oa = (struct ospf6_area *)THREAD_ARG(thread); - oa->thread_intra_prefix_lsa = NULL; if (oa->ospf6->gr_info.restart_in_progress) { if (IS_DEBUG_OSPF6_GR) @@ -1269,7 +1265,6 @@ int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread) uint16_t type; oi = (struct ospf6_interface *)THREAD_ARG(thread); - oi->thread_intra_prefix_lsa = NULL; assert(oi->area); diff --git a/ospf6d/ospf6_nssa.c b/ospf6d/ospf6_nssa.c index 809768fb5c..c2e9b7f28a 100644 --- a/ospf6d/ospf6_nssa.c +++ b/ospf6d/ospf6_nssa.c @@ -1168,8 +1168,6 @@ static int ospf6_abr_task_timer(struct thread *thread) { struct ospf6 *ospf6 = THREAD_ARG(thread); - ospf6->t_abr_task = NULL; - if (IS_OSPF6_DEBUG_ABR) zlog_debug("Running ABR task on timer"); diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 6fe7055202..9e3bb4895a 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -432,7 +432,6 @@ static struct ospf6 *ospf6_create(const char *name) o->rt_aggr_tbl = route_table_init(); o->aggr_delay_interval = OSPF6_EXTL_AGGR_DEFAULT_DELAY; - o->t_external_aggr = NULL; o->aggr_action = OSPF6_ROUTE_AGGR_NONE; o->fd = -1;