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
This commit is contained in:
Michael Tuexen 2017-01-31 23:36:31 +00:00
parent 7858d7cb8e
commit 2aa116007c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=313031

View File

@ -108,7 +108,7 @@ sctp_pathmtu_adjustment(struct sctp_tcb *stcb, uint16_t nxtsz)
/* 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);
}