Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jan 2017 23:36:31 +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: r313031 - head/sys/netinet
Message-ID:  <201701312336.v0VNaVhv040528@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Tue Jan 31 23:36:31 2017
New Revision: 313031
URL: https://svnweb.freebsd.org/changeset/base/313031

Log:
  Take the SCTP common header into account when computing the
  space available for chunks. This unbreaks the handling of
  ICMPV6 packets indicating "packet too big". It just worked
  for IPv4 since we are overbooking for IPv4.
  
  MFC after:	1 week

Modified:
  head/sys/netinet/sctp_usrreq.c

Modified: head/sys/netinet/sctp_usrreq.c
==============================================================================
--- head/sys/netinet/sctp_usrreq.c	Tue Jan 31 23:34:02 2017	(r313030)
+++ head/sys/netinet/sctp_usrreq.c	Tue Jan 31 23:36:31 2017	(r313031)
@@ -108,7 +108,7 @@ sctp_pathmtu_adjustment(struct sctp_tcb 
 	/* Adjust that too */
 	stcb->asoc.smallest_mtu = nxtsz;
 	/* now off to subtract IP_DF flag if needed */
-	overhead = IP_HDR_SIZE;
+	overhead = IP_HDR_SIZE + sizeof(struct sctphdr);
 	if (sctp_auth_is_required_chunk(SCTP_DATA, stcb->asoc.peer_auth_chunks)) {
 		overhead += sctp_get_auth_chunk_len(stcb->asoc.peer_hmac_id);
 	}



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