summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSridhar Samudrala <sri@us.ibm.com>2006-09-05 21:59:11 +0200
committerAdrian Bunk <bunk@stusta.de>2006-09-05 21:59:11 +0200
commit809f5560b0718ab0e0e8ba6eabc59ed21db31673 (patch)
tree73fb5791929cbfb136be8c2aabd782fd2207d165 /net
parent725eb3f2eb34ff77ce02c50f79c6912e9476cbf5 (diff)
Fix sctp_primitive_ABORT() call in sctp_close()
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>
Diffstat (limited to 'net')
-rw-r--r--net/sctp/socket.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 04707003ffae..49f930571030 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -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);