]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Fix sctp_primitive_ABORT() call in sctp_close()
authorSridhar Samudrala <sri@us.ibm.com>
Tue, 5 Sep 2006 19:59:11 +0000 (21:59 +0200)
committerAdrian Bunk <bunk@stusta.de>
Tue, 5 Sep 2006 19:59:11 +0000 (21:59 +0200)
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.

Adrian Bunk:
Ported to 2.6.16.

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

index 04707003ffaed2cf1137ea73eb35a6285857b46e..49f9305710305f90d2f584111f5b31888857c2d9 100644 (file)
@@ -1243,9 +1243,13 @@ SCTP_STATIC void sctp_close(struct sock *sk, long timeout)
                                sctp_association_free(asoc);
 
                        } else if (sock_flag(sk, SOCK_LINGER) &&
-                                  !sk->sk_lingertime)
-                               sctp_primitive_ABORT(asoc, NULL);
-                       else
+                                  !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);
                } else
                        sctp_primitive_SHUTDOWN(asoc, NULL);