Fix a bug in computing the fragmentation point.
When using AF_CONN sockets, the fragmentation point was still
accounting for an IPv4 header. This is fixed by this patch.
This is related to
@@ -6747,7 +6747,15 @@ sctp_get_frag_point(struct sctp_tcb *stcb,
if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) {
ovh = SCTP_MIN_OVERHEAD;
} else {
+#if defined(__Userspace__)
+ if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_BOUND_CONN) {
+ ovh = sizeof(struct sctphdr);
+ } else {
+ ovh = SCTP_MIN_V4_OVERHEAD;
+ }
+#else
ovh = SCTP_MIN_V4_OVERHEAD;
+#endif
}
ovh += SCTP_DATA_CHUNK_OVERHEAD(stcb);
if (stcb->asoc.sctp_frag_point > asoc->smallest_mtu)
