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);
        }
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to