sctp: rwnd_press should be cumulative
authorVlad Yasevich <vladislav.yasevich@hp.com>
Sat, 1 May 2010 02:41:10 +0000 (22:41 -0400)
committerVlad Yasevich <vladislav.yasevich@hp.com>
Sat, 1 May 2010 02:41:10 +0000 (22:41 -0400)
rwnd_press tracks the pressure on the recieve window.  Every
timer the receive buffer overlows, we truncate the receive
window and then grow it back.  However, if we don't track
the cumulative presser, it's possible to reach a situation
when receive buffer is empty, but rwnd stays truncated.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
net/sctp/associola.c

index 37753cd48be3f45d7b8eb4f89bc4c73ae87b0310..65f9a7cdf4666c985d4169506a042e06c49ca17f 100644 (file)
@@ -1482,7 +1482,7 @@ void sctp_assoc_rwnd_decrease(struct sctp_association *asoc, unsigned len)
        if (asoc->rwnd >= len) {
                asoc->rwnd -= len;
                if (over) {
-                       asoc->rwnd_press = asoc->rwnd;
+                       asoc->rwnd_press += asoc->rwnd;
                        asoc->rwnd = 0;
                }
        } else {