Date: Wed, 14 May 2014 17:28:49 +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-9@freebsd.org Subject: svn commit: r266057 - stable/9/sys/netinet Message-ID: <201405141728.s4EHSnNF048441@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Wed May 14 17:28:49 2014 New Revision: 266057 URL: http://svnweb.freebsd.org/changeset/base/266057 Log: MFC r257803: Make sure that we don't try to build an ASCONF-ACK chunk larger than what fits in the the mbuf cluster. This issue was reported by Andrew Galante. Modified: stable/9/sys/netinet/sctp_asconf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_asconf.c ============================================================================== --- stable/9/sys/netinet/sctp_asconf.c Wed May 14 17:26:06 2014 (r266056) +++ stable/9/sys/netinet/sctp_asconf.c Wed May 14 17:28:49 2014 (r266057) @@ -2616,7 +2616,8 @@ sctp_compose_asconf(struct sctp_tcb *stc /* get the parameter length */ p_length = SCTP_SIZE32(aa->ap.aph.ph.param_length); /* will it fit in current chunk? */ - if (SCTP_BUF_LEN(m_asconf) + p_length > stcb->asoc.smallest_mtu) { + if ((SCTP_BUF_LEN(m_asconf) + p_length > stcb->asoc.smallest_mtu) || + (SCTP_BUF_LEN(m_asconf) + p_length > MCLBYTES)) { /* won't fit, so we're done with this chunk */ break; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405141728.s4EHSnNF048441>