Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Aug 2020 21:10:24 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r364544 - stable/12/sys/netinet
Message-ID:  <202008232110.07NLAOHA048219@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sun Aug 23 21:10:24 2020
New Revision: 364544
URL: https://svnweb.freebsd.org/changeset/base/364544

Log:
  MFC r357708:
  Stop the PMTU and HB timer when removing a net, not when freeing it.

Modified:
  stable/12/sys/netinet/sctp_pcb.c
  stable/12/sys/netinet/sctp_var.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/sctp_pcb.c
==============================================================================
--- stable/12/sys/netinet/sctp_pcb.c	Sun Aug 23 21:07:39 2020	(r364543)
+++ stable/12/sys/netinet/sctp_pcb.c	Sun Aug 23 21:10:24 2020	(r364544)
@@ -4422,8 +4422,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);
@@ -4471,6 +4473,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);
 }
 
@@ -6991,7 +6997,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: stable/12/sys/netinet/sctp_var.h
==============================================================================
--- stable/12/sys/netinet/sctp_var.h	Sun Aug 23 21:07:39 2020	(r364543)
+++ stable/12/sys/netinet/sctp_var.h	Sun Aug 23 21:10:24 2020	(r364544)
@@ -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?202008232110.07NLAOHA048219>