svn commit: r319403 - in stable/11/sys: netinet netinet6

Michael Tuexen tuexen at FreeBSD.org
Thu Jun 1 08:58:40 UTC 2017


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) {


More information about the svn-src-stable mailing list