[SCTP]: Do not increase rwnd when reading partial notification.
authorVlad Yasevich <vladislav.yasevich@hp.com>
Fri, 11 Jan 2008 15:12:56 +0000 (10:12 -0500)
committerVlad Yasevich <vladislav.yasevich@hp.com>
Tue, 5 Feb 2008 15:59:30 +0000 (10:59 -0500)
When a user reads a partial notification message, do not
update rwnd since notifications must not be counted towards
receive window.

Tested-by: Oliver Roll <mail@oliroll.de>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
net/sctp/socket.c

index 401dac6..894c278 100644 (file)
@@ -1911,7 +1911,8 @@ SCTP_STATIC int sctp_recvmsg(struct kiocb *iocb, struct sock *sk,
                 * rwnd by that amount. If all the data in the skb is read,
                 * rwnd is updated when the event is freed.
                 */
-               sctp_assoc_rwnd_increase(event->asoc, copied);
+               if (!sctp_ulpevent_is_notification(event))
+                       sctp_assoc_rwnd_increase(event->asoc, copied);
                goto out;
        } else if ((event->msg_flags & MSG_NOTIFICATION) ||
                   (event->msg_flags & MSG_EOR))