aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/sctp/output.c10
-rw-r--r--net/sctp/outqueue.c3
2 files changed, 10 insertions, 3 deletions
diff --git a/net/sctp/output.c b/net/sctp/output.c
index cdc5a3936766..3ef4351dd956 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -633,7 +633,7 @@ static sctp_xmit_t sctp_packet_append_data(struct sctp_packet *packet,
633 * data will fit or delay in hopes of bundling a full 633 * data will fit or delay in hopes of bundling a full
634 * sized packet. 634 * sized packet.
635 */ 635 */
636 if (len < asoc->pathmtu - packet->overhead) { 636 if (len < asoc->frag_point) {
637 retval = SCTP_XMIT_NAGLE_DELAY; 637 retval = SCTP_XMIT_NAGLE_DELAY;
638 goto finish; 638 goto finish;
639 } 639 }
@@ -645,7 +645,13 @@ static sctp_xmit_t sctp_packet_append_data(struct sctp_packet *packet,
645 /* Keep track of how many bytes are in flight to the receiver. */ 645 /* Keep track of how many bytes are in flight to the receiver. */
646 asoc->outqueue.outstanding_bytes += datasize; 646 asoc->outqueue.outstanding_bytes += datasize;
647 647
648 /* Update our view of the receiver's rwnd. */ 648 /* Update our view of the receiver's rwnd. Include sk_buff overhead
649 * while updating peer.rwnd so that it reduces the chances of a
650 * receiver running out of receive buffer space even when receive
651 * window is still open. This can happen when a sender is sending
652 * sending small messages.
653 */
654 datasize += sizeof(struct sk_buff);
649 if (datasize < rwnd) 655 if (datasize < rwnd)
650 rwnd -= datasize; 656 rwnd -= datasize;
651 else 657 else
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index 37074a39ecbb..739582415bf6 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -416,7 +416,8 @@ void sctp_retransmit_mark(struct sctp_outq *q,
416 * (Section 7.2.4)), add the data size of those 416 * (Section 7.2.4)), add the data size of those
417 * chunks to the rwnd. 417 * chunks to the rwnd.
418 */ 418 */
419 q->asoc->peer.rwnd += sctp_data_size(chunk); 419 q->asoc->peer.rwnd += (sctp_data_size(chunk) +
420 sizeof(struct sk_buff));
420 q->outstanding_bytes -= sctp_data_size(chunk); 421 q->outstanding_bytes -= sctp_data_size(chunk);
421 transport->flight_size -= sctp_data_size(chunk); 422 transport->flight_size -= sctp_data_size(chunk);
422 423