]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: Do not explicitly set the thread pointer to NULL 9763/head
authorDonatas Abraitis <donatas.abraitis@gmail.com>
Thu, 7 Oct 2021 10:25:43 +0000 (13:25 +0300)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Fri, 8 Oct 2021 05:56:42 +0000 (08:56 +0300)
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 <donatas.abraitis@gmail.com>
ospf6d/ospf6_asbr.c
ospf6d/ospf6_gr_helper.c
ospf6d/ospf6_intra.c
ospf6d/ospf6_nssa.c
ospf6d/ospf6_top.c

index 733f4ba1fb71df45b6b5fd279b5e1ab3ab50b9a1..cd2791fc48ccc1b71bb3527b85f73d423e83d08c 100644 (file)
@@ -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)
index ad8998b1edc0043837f4e0d5bc54eb375e15ecef..78f842db6c53682bf7a4892bcf74523123cb70e2 100644 (file)
@@ -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;
 }
index 2d82ff7ce81748b45a81f2532296e39e8b69675f..6abc1c7d0993893dabc63eb500bafb6da925dcd9 100644 (file)
@@ -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);
 
index 809768fb5ca9396ee9364d4e8a574ceb36005327..c2e9b7f28af3906aad612374e95413fe89a8b0ad 100644 (file)
@@ -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");
 
index 6fe70552027ba545cd8c571b1d00135be1ec86a6..9e3bb4895a82d7eed36d1f7a1d87d3da205dc870 100644 (file)
@@ -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;