Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 May 2015 08:08:17 +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: r282810 - head/sys/netinet
Message-ID:  <201505120808.t4C88HSc007707@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Tue May 12 08:08:16 2015
New Revision: 282810
URL: https://svnweb.freebsd.org/changeset/base/282810

Log:
  Ensure that the COOKIE-ACK can be sent over UDP if the COOKIE-ECHO was
  received over UDP.
  Thanks to Felix Weinrank for makeing me aware of the problem and to
  Irene Ruengeler for providing the fix.
  
  MFC after: 1 week

Modified:
  head/sys/netinet/sctp_input.c

Modified: head/sys/netinet/sctp_input.c
==============================================================================
--- head/sys/netinet/sctp_input.c	Tue May 12 07:37:27 2015	(r282809)
+++ head/sys/netinet/sctp_input.c	Tue May 12 08:08:16 2015	(r282810)
@@ -2325,12 +2325,13 @@ sctp_process_cookie_new(struct mbuf *m, 
 	    sctp_is_feature_on(inp, SCTP_PCB_FLAGS_AUTOCLOSE)) {
 		sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, NULL);
 	}
-	/* calculate the RTT */
 	(void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered);
 	if ((netp) && (*netp)) {
+		/* calculate the RTT and set the encaps port */
 		(*netp)->RTO = sctp_calculate_rto(stcb, asoc, *netp,
 		    &cookie->time_entered, sctp_align_unsafe_makecopy,
 		    SCTP_RTT_FROM_NON_DATA);
+		(*netp)->port = port;
 	}
 	/* respond with a COOKIE-ACK */
 	sctp_send_cookie_ack(stcb);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505120808.t4C88HSc007707>