Commit b9ac8672 authored by Sridhar Samudrala's avatar Sridhar Samudrala Committed by David S. Miller

[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: default avatarSridhar Samudrala <sri@us.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dc709bd1
...@@ -1289,9 +1289,13 @@ SCTP_STATIC void sctp_close(struct sock *sk, long timeout) ...@@ -1289,9 +1289,13 @@ SCTP_STATIC void sctp_close(struct sock *sk, long timeout)
} }
} }
if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime) if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime) {
sctp_primitive_ABORT(asoc, NULL); struct sctp_chunk *chunk;
else
chunk = sctp_make_abort_user(asoc, NULL, 0);
if (chunk)
sctp_primitive_ABORT(asoc, chunk);
} else
sctp_primitive_SHUTDOWN(asoc, NULL); sctp_primitive_SHUTDOWN(asoc, NULL);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment