Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jan 2016 11:10:22 +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: r295070 - head/sys/netinet
Message-ID:  <201601301110.u0UBAMBc088835@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sat Jan 30 11:10:22 2016
New Revision: 295070
URL: https://svnweb.freebsd.org/changeset/base/295070

Log:
  Don't change the remote UDP encapsulation port for SCTP packets
  containing an INIT chunk.
  
  MFC after: 3 days

Modified:
  head/sys/netinet/sctp_input.c

Modified: head/sys/netinet/sctp_input.c
==============================================================================
--- head/sys/netinet/sctp_input.c	Sat Jan 30 10:39:05 2016	(r295069)
+++ head/sys/netinet/sctp_input.c	Sat Jan 30 11:10:22 2016	(r295070)
@@ -5684,7 +5684,9 @@ sctp_common_input_processing(struct mbuf
 			stcb = sctp_findassociation_addr(m, offset, src, dst,
 			    sh, ch, &inp, &net, vrf_id);
 #if defined(INET) || defined(INET6)
-			if ((net != NULL) && (port != 0)) {
+			if ((net != NULL) &&
+			    (ch->chunk_type != SCTP_INITIATION) &&
+			    (port != 0)) {
 				if (net->port == 0) {
 					sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr));
 				}
@@ -5715,7 +5717,9 @@ sctp_common_input_processing(struct mbuf
 	stcb = sctp_findassociation_addr(m, offset, src, dst,
 	    sh, ch, &inp, &net, vrf_id);
 #if defined(INET) || defined(INET6)
-	if ((net != NULL) && (port != 0)) {
+	if ((net != NULL) &&
+	    (ch->chunk_type != SCTP_INITIATION) &&
+	    (port != 0)) {
 		if (net->port == 0) {
 			sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr));
 		}
@@ -5827,7 +5831,9 @@ sctp_common_input_processing(struct mbuf
 			 */
 			inp = stcb->sctp_ep;
 #if defined(INET) || defined(INET6)
-			if ((net != NULL) && (port != 0)) {
+			if ((net != NULL) &&
+			    (ch->chunk_type != SCTP_INITIATION) &&
+			    (port != 0)) {
 				if (net->port == 0) {
 					sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr));
 				}



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