mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-17 00:20:07 +00:00
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 <donatas.abraitis@gmail.com>
This commit is contained in:
parent
ae84497d13
commit
d573b8f863
@ -204,7 +204,6 @@ int ospf6_orig_as_external_lsa(struct thread *thread)
|
|||||||
uint32_t type, adv_router;
|
uint32_t type, adv_router;
|
||||||
|
|
||||||
oi = (struct ospf6_interface *)THREAD_ARG(thread);
|
oi = (struct ospf6_interface *)THREAD_ARG(thread);
|
||||||
oi->thread_as_extern_lsa = NULL;
|
|
||||||
|
|
||||||
if (oi->state == OSPF6_INTERFACE_DOWN)
|
if (oi->state == OSPF6_INTERFACE_DOWN)
|
||||||
return 0;
|
return 0;
|
||||||
@ -1091,8 +1090,6 @@ static int ospf6_asbr_routemap_update_timer(struct thread *thread)
|
|||||||
struct ospf6_redist *red;
|
struct ospf6_redist *red;
|
||||||
int type;
|
int type;
|
||||||
|
|
||||||
ospf6->t_distribute_update = NULL;
|
|
||||||
|
|
||||||
for (type = 0; type < ZEBRA_ROUTE_MAX; type++) {
|
for (type = 0; type < ZEBRA_ROUTE_MAX; type++) {
|
||||||
red = ospf6_redist_lookup(ospf6, type, 0);
|
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);
|
struct ospf6 *ospf6 = THREAD_ARG(thread);
|
||||||
int operation = 0;
|
int operation = 0;
|
||||||
|
|
||||||
ospf6->t_external_aggr = NULL;
|
|
||||||
operation = ospf6->aggr_action;
|
operation = ospf6->aggr_action;
|
||||||
|
|
||||||
if (IS_OSPF6_DEBUG_AGGR)
|
if (IS_OSPF6_DEBUG_AGGR)
|
||||||
|
@ -202,8 +202,6 @@ static int ospf6_handle_grace_timer_expiry(struct thread *thread)
|
|||||||
{
|
{
|
||||||
struct ospf6_neighbor *nbr = THREAD_ARG(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);
|
ospf6_gr_helper_exit(nbr, OSPF6_GR_HELPER_GRACE_TIMEOUT);
|
||||||
return OSPF6_SUCCESS;
|
return OSPF6_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -248,7 +248,6 @@ int ospf6_router_lsa_originate(struct thread *thread)
|
|||||||
int count;
|
int count;
|
||||||
|
|
||||||
oa = (struct ospf6_area *)THREAD_ARG(thread);
|
oa = (struct ospf6_area *)THREAD_ARG(thread);
|
||||||
oa->thread_router_lsa = NULL;
|
|
||||||
|
|
||||||
if (oa->ospf6->gr_info.restart_in_progress) {
|
if (oa->ospf6->gr_info.restart_in_progress) {
|
||||||
if (IS_DEBUG_OSPF6_GR)
|
if (IS_DEBUG_OSPF6_GR)
|
||||||
@ -533,7 +532,6 @@ int ospf6_network_lsa_originate(struct thread *thread)
|
|||||||
uint16_t type;
|
uint16_t type;
|
||||||
|
|
||||||
oi = (struct ospf6_interface *)THREAD_ARG(thread);
|
oi = (struct ospf6_interface *)THREAD_ARG(thread);
|
||||||
oi->thread_network_lsa = NULL;
|
|
||||||
|
|
||||||
/* The interface must be enabled until here. A Network-LSA of a
|
/* The interface must be enabled until here. A Network-LSA of a
|
||||||
disabled interface (but was once enabled) should be flushed
|
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;
|
struct ospf6_prefix *op;
|
||||||
|
|
||||||
oi = (struct ospf6_interface *)THREAD_ARG(thread);
|
oi = (struct ospf6_interface *)THREAD_ARG(thread);
|
||||||
oi->thread_link_lsa = NULL;
|
|
||||||
|
|
||||||
assert(oi->area);
|
assert(oi->area);
|
||||||
|
|
||||||
@ -1030,7 +1027,6 @@ int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread)
|
|||||||
int ls_id = 0;
|
int ls_id = 0;
|
||||||
|
|
||||||
oa = (struct ospf6_area *)THREAD_ARG(thread);
|
oa = (struct ospf6_area *)THREAD_ARG(thread);
|
||||||
oa->thread_intra_prefix_lsa = NULL;
|
|
||||||
|
|
||||||
if (oa->ospf6->gr_info.restart_in_progress) {
|
if (oa->ospf6->gr_info.restart_in_progress) {
|
||||||
if (IS_DEBUG_OSPF6_GR)
|
if (IS_DEBUG_OSPF6_GR)
|
||||||
@ -1269,7 +1265,6 @@ int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread)
|
|||||||
uint16_t type;
|
uint16_t type;
|
||||||
|
|
||||||
oi = (struct ospf6_interface *)THREAD_ARG(thread);
|
oi = (struct ospf6_interface *)THREAD_ARG(thread);
|
||||||
oi->thread_intra_prefix_lsa = NULL;
|
|
||||||
|
|
||||||
assert(oi->area);
|
assert(oi->area);
|
||||||
|
|
||||||
|
@ -1168,8 +1168,6 @@ static int ospf6_abr_task_timer(struct thread *thread)
|
|||||||
{
|
{
|
||||||
struct ospf6 *ospf6 = THREAD_ARG(thread);
|
struct ospf6 *ospf6 = THREAD_ARG(thread);
|
||||||
|
|
||||||
ospf6->t_abr_task = NULL;
|
|
||||||
|
|
||||||
if (IS_OSPF6_DEBUG_ABR)
|
if (IS_OSPF6_DEBUG_ABR)
|
||||||
zlog_debug("Running ABR task on timer");
|
zlog_debug("Running ABR task on timer");
|
||||||
|
|
||||||
|
@ -432,7 +432,6 @@ static struct ospf6 *ospf6_create(const char *name)
|
|||||||
|
|
||||||
o->rt_aggr_tbl = route_table_init();
|
o->rt_aggr_tbl = route_table_init();
|
||||||
o->aggr_delay_interval = OSPF6_EXTL_AGGR_DEFAULT_DELAY;
|
o->aggr_delay_interval = OSPF6_EXTL_AGGR_DEFAULT_DELAY;
|
||||||
o->t_external_aggr = NULL;
|
|
||||||
o->aggr_action = OSPF6_ROUTE_AGGR_NONE;
|
o->aggr_action = OSPF6_ROUTE_AGGR_NONE;
|
||||||
|
|
||||||
o->fd = -1;
|
o->fd = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user