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. MFC after: 3 days
This commit is contained in:
parent
460434b9e7
commit
a9d94d290b
@ -2616,7 +2616,8 @@ sctp_compose_asconf(struct sctp_tcb *stcb, int *retlen, int addr_locked)
|
||||
/* 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user