diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2021-10-04 09:47:29 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2021-10-04 09:47:29 -0400 | 
| commit | eb946ef5052e7aaddc1975f7a8a287d439e0ee29 (patch) | |
| tree | 138e6ac681e01bead4cf20bfa75c08d26c5332ae /eigrpd/eigrp_packet.c | |
| parent | 64da2e8ecd842759511847a990274616dc05aade (diff) | |
eigrpd: Ensure better `struct thread *` semantics
1) 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.
2) Fix mixup of `struct eigrp_interface` and `struct eigrp`
usage of the same thread pointer.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'eigrpd/eigrp_packet.c')
| -rw-r--r-- | eigrpd/eigrp_packet.c | 6 | 
1 files changed, 0 insertions, 6 deletions
diff --git a/eigrpd/eigrp_packet.c b/eigrpd/eigrp_packet.c index 39e384c121..529d94567d 100644 --- a/eigrpd/eigrp_packet.c +++ b/eigrpd/eigrp_packet.c @@ -340,8 +340,6 @@ int eigrp_write(struct thread *thread)  #endif /* WANT_EIGRP_WRITE_FRAGMENT */  #define EIGRP_WRITE_IPHL_SHIFT 2 -	eigrp->t_write = NULL; -  	node = listhead(eigrp->oi_write_q);  	assert(node);  	ei = listgetdata(node); @@ -470,7 +468,6 @@ out:  	/* If packets still remain in queue, call write thread. */  	if (!list_isempty(eigrp->oi_write_q)) { -		eigrp->t_write = NULL;  		thread_add_write(master, eigrp_write, eigrp, eigrp->fd,  				 &eigrp->t_write);  	} @@ -497,7 +494,6 @@ int eigrp_read(struct thread *thread)  	eigrp = THREAD_ARG(thread);  	/* prepare for next packet. */ -	eigrp->t_read = NULL;  	thread_add_read(master, eigrp_read, eigrp, eigrp->fd, &eigrp->t_read);  	stream_reset(eigrp->ibuf); @@ -1013,7 +1009,6 @@ int eigrp_unack_packet_retrans(struct thread *thread)  			return eigrp_retrans_count_exceeded(ep, nbr);  		/*Start retransmission timer*/ -		ep->t_retrans_timer = NULL;  		thread_add_timer(master, eigrp_unack_packet_retrans, nbr,  				 EIGRP_PACKET_RETRANS_TIME,  				 &ep->t_retrans_timer); @@ -1049,7 +1044,6 @@ int eigrp_unack_multicast_packet_retrans(struct thread *thread)  			return eigrp_retrans_count_exceeded(ep, nbr);  		/*Start retransmission timer*/ -		ep->t_retrans_timer = NULL;  		thread_add_timer(master, eigrp_unack_multicast_packet_retrans,  				 nbr, EIGRP_PACKET_RETRANS_TIME,  				 &ep->t_retrans_timer);  | 
