Skip to content

Commit

Permalink
SCTP: Initialize partial_bytes_acked to 0, when all of the data is ac…
Browse files Browse the repository at this point in the history
…ked.

According to RFC4960 7.2.2, 
When all of the data transmitted by the sender has
been acknowledged by the recerver, partial_bytes_acked is initialized to 0.

This patch conforms to rfc requirement. 
Without this fix, cwnd might be error incremented.

Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Gui Jianfeng authored and David S. Miller committed Apr 17, 2008
1 parent 2e5a3ea commit 8b73a07
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/sctp/outqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -1532,6 +1532,8 @@ static void sctp_check_transmitted(struct sctp_outq *q,
bytes_acked);

transport->flight_size -= bytes_acked;
if (transport->flight_size == 0)
transport->partial_bytes_acked = 0;
q->outstanding_bytes -= bytes_acked;
} else {
/* RFC 2960 6.1, sctpimpguide-06 2.15.2
Expand Down

0 comments on commit 8b73a07

Please sign in to comment.