From: Gui Jianfeng Date: Thu, 17 Apr 2008 21:22:18 +0000 (-0700) Subject: SCTP: Initialize partial_bytes_acked to 0, when all of the data is acked. X-Git-Tag: firefly_0821_release~21615^2~7 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8b73a07c8ffaa70683022566080f4df3328ea18d;p=firefly-linux-kernel-4.4.55.git SCTP: Initialize partial_bytes_acked to 0, when all of the data is acked. 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 Acked-by: Vlad Yasevich Signed-off-by: David S. Miller --- diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index a7ba9e146dff..59edfd25a19c 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c @@ -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