summary refs log tree commit diff
path: root/include/net/sctp/sctp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sctp/sctp.h')
-rw-r--r--include/net/sctp/sctp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 6f79415f6634..20c0c1be2ca7 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -444,13 +444,13 @@ static inline int sctp_frag_point(const struct sctp_association *asoc, int pmtu)
 	int frag = pmtu;
 
 	frag -= sp->pf->af->net_header_len;
-	frag -= sizeof(struct sctphdr) + sizeof(struct sctp_data_chunk);
+	frag -= sizeof(struct sctphdr) + sctp_datachk_len(&asoc->stream);
 
 	if (asoc->user_frag)
 		frag = min_t(int, frag, asoc->user_frag);
 
 	frag = SCTP_TRUNC4(min_t(int, frag, SCTP_MAX_CHUNK_LEN -
-					    sizeof(struct sctp_data_chunk)));
+					    sctp_datachk_len(&asoc->stream)));
 
 	return frag;
 }