Date: Sun, 9 Feb 2020 22:40:05 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357708 - head/sys/netinet Message-ID: <202002092240.019Me5im087828@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Sun Feb 9 22:40:05 2020 New Revision: 357708 URL: https://svnweb.freebsd.org/changeset/base/357708 Log: Stop the PMTU and HB timer when removing a net, not when freeing it. Submitted by: Taylor Brandstetter MFC after: 1 week Modified: head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_var.h Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun Feb 9 22:35:49 2020 (r357707) +++ head/sys/netinet/sctp_pcb.c Sun Feb 9 22:40:05 2020 (r357708) @@ -4425,8 +4425,10 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockadd 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 @@ out: 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); Modified: head/sys/netinet/sctp_var.h ============================================================================== --- head/sys/netinet/sctp_var.h Sun Feb 9 22:35:49 2020 (r357707) +++ head/sys/netinet/sctp_var.h Sun Feb 9 22:40:05 2020 (r357708) @@ -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; \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002092240.019Me5im087828>