aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSridhar Samudrala <sri@us.ibm.com>2006-08-28 13:55:32 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-08 14:51:38 -0700
commite564f8a9cc64ebc06794d716e3240538b4a61f28 (patch)
tree0032f850a5515aead8005ec98a9bb7c023a29f7f /net
parent24e2c32c847ab496bd79d417265534ff3da7b009 (diff)
SCTP: 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. Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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 600eb59287e..5b1c8375c52 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -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);
}