1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00

Stop the PMTU and HB timer when removing a net, not when freeing it.

Submitted by:		Taylor Brandstetter
MFC after:		1 week
This commit is contained in:
Michael Tuexen 2020-02-09 22:40:05 +00:00
parent 020419b665
commit 6a34ec63ab
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357708
2 changed files with 7 additions and 3 deletions

View File

@ -4425,8 +4425,10 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockaddr *firstaddr,
void
sctp_remove_net(struct sctp_tcb *stcb, struct sctp_nets *net)
{
struct sctp_inpcb *inp;
struct sctp_association *asoc;
inp = stcb->sctp_ep;
asoc = &stcb->asoc;
asoc->numnets--;
TAILQ_REMOVE(&asoc->nets, net, sctp_next);
@ -4474,6 +4476,10 @@ sctp_remove_net(struct sctp_tcb *stcb, struct sctp_nets *net)
sctp_free_remote_addr(stcb->asoc.alternate);
stcb->asoc.alternate = NULL;
}
sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net,
SCTP_FROM_SCTP_PCB + SCTP_LOC_9);
sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net,
SCTP_FROM_SCTP_PCB + SCTP_LOC_10);
sctp_free_remote_addr(net);
}
@ -6994,7 +7000,7 @@ sctp_drain_mbufs(struct sctp_tcb *stcb)
*/
asoc->last_revoke_count = cnt;
sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL,
SCTP_FROM_SCTP_PCB + SCTP_LOC_16);
SCTP_FROM_SCTP_PCB + SCTP_LOC_11);
/* sa_ignore NO_NULL_CHK */
sctp_send_sack(stcb, SCTP_SO_NOT_LOCKED);
sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_DRAIN, SCTP_SO_NOT_LOCKED);

View File

@ -187,8 +187,6 @@ extern struct pr_usrreqs sctp_usrreqs;
if ((__net)) { \
if (SCTP_DECREMENT_AND_CHECK_REFCOUNT(&(__net)->ref_count)) { \
(void)SCTP_OS_TIMER_STOP(&(__net)->rxt_timer.timer); \
(void)SCTP_OS_TIMER_STOP(&(__net)->pmtu_timer.timer); \
(void)SCTP_OS_TIMER_STOP(&(__net)->hb_timer.timer); \
if ((__net)->ro.ro_rt) { \
RTFREE((__net)->ro.ro_rt); \
(__net)->ro.ro_rt = NULL; \