]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
SCTP: Fix sctp_primitive_ABORT() call in sctp_close().
authorSridhar Samudrala <sri@us.ibm.com>
Mon, 28 Aug 2006 20:55:32 +0000 (13:55 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 8 Sep 2006 21:51:38 +0000 (14:51 -0700)
With the recent fix, the callers of sctp_primitive_ABORT()
need to create an ABORT chunk and pass it as an argument rather
than msghdr that was passed earlier.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/socket.c

index 600eb59287e6fe3f716f9b14914469c47da8e270..5b1c8375c52113ecadf3c577a4286ebea0ff72c0 100644 (file)
@@ -1246,9 +1246,13 @@ SCTP_STATIC void sctp_close(struct sock *sk, long timeout)
                        }
                }
 
-               if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime)
-                       sctp_primitive_ABORT(asoc, NULL);
-               else
+               if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime) {
+                       struct sctp_chunk *chunk;
+
+                       chunk = sctp_make_abort_user(asoc, NULL, 0);
+                       if (chunk)
+                               sctp_primitive_ABORT(asoc, chunk);
+               } else
                        sctp_primitive_SHUTDOWN(asoc, NULL);
        }