Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Jun 2017 08:58:39 +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-11@freebsd.org
Subject:   svn commit: r319403 - in stable/11/sys: netinet netinet6
Message-ID:  <201706010858.v518wdDj034971@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Thu Jun  1 08:58:39 2017
New Revision: 319403
URL: https://svnweb.freebsd.org/changeset/base/319403

Log:
  MFC 317464:
  
  Fix an issue with MTU calculation if an ICMP message is received
  for an SCTP/UDP packet.

Modified:
  stable/11/sys/netinet/sctp_usrreq.c
  stable/11/sys/netinet6/sctp6_usrreq.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/sctp_usrreq.c
==============================================================================
--- stable/11/sys/netinet/sctp_usrreq.c	Thu Jun  1 08:48:16 2017	(r319402)
+++ stable/11/sys/netinet/sctp_usrreq.c	Thu Jun  1 08:58:39 2017	(r319403)
@@ -220,11 +220,11 @@ sctp_notify(struct sctp_inpcb *inp,
 			timer_stopped = 0;
 		}
 		/* Update the path MTU. */
+		if (net->port) {
+			next_mtu -= sizeof(struct udphdr);
+		}
 		if (net->mtu > next_mtu) {
 			net->mtu = next_mtu;
-			if (net->port) {
-				net->mtu -= sizeof(struct udphdr);
-			}
 		}
 		/* Update the association MTU */
 		if (stcb->asoc.smallest_mtu > next_mtu) {

Modified: stable/11/sys/netinet6/sctp6_usrreq.c
==============================================================================
--- stable/11/sys/netinet6/sctp6_usrreq.c	Thu Jun  1 08:48:16 2017	(r319402)
+++ stable/11/sys/netinet6/sctp6_usrreq.c	Thu Jun  1 08:58:39 2017	(r319403)
@@ -237,11 +237,11 @@ sctp6_notify(struct sctp_inpcb *inp,
 			timer_stopped = 0;
 		}
 		/* Update the path MTU. */
+		if (net->port) {
+			next_mtu -= sizeof(struct udphdr);
+		}
 		if (net->mtu > next_mtu) {
 			net->mtu = next_mtu;
-			if (net->port) {
-				net->mtu -= sizeof(struct udphdr);
-			}
 		}
 		/* Update the association MTU */
 		if (stcb->asoc.smallest_mtu > next_mtu) {



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