aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/output.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sctp/output.c b/net/sctp/output.c
index e25e2e20b63d..d0b84f6eba4d 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -697,13 +697,14 @@ static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet,
697 */ 697 */
698 if (!sctp_sk(asoc->base.sk)->nodelay && sctp_packet_empty(packet) && 698 if (!sctp_sk(asoc->base.sk)->nodelay && sctp_packet_empty(packet) &&
699 inflight && sctp_state(asoc, ESTABLISHED)) { 699 inflight && sctp_state(asoc, ESTABLISHED)) {
700 unsigned len = datasize + q->out_qlen; 700 unsigned max = transport->pathmtu - packet->overhead;
701 unsigned len = chunk->skb->len + q->out_qlen;
701 702
702 /* Check whether this chunk and all the rest of pending 703 /* Check whether this chunk and all the rest of pending
703 * data will fit or delay in hopes of bundling a full 704 * data will fit or delay in hopes of bundling a full
704 * sized packet. 705 * sized packet.
705 */ 706 */
706 if (len < asoc->frag_point) { 707 if (len < max) {
707 retval = SCTP_XMIT_NAGLE_DELAY; 708 retval = SCTP_XMIT_NAGLE_DELAY;
708 goto finish; 709 goto finish;
709 } 710 }