Commit b9ac86727fc02cc7117ef3fe518a4d51cd573c82
Committed by
David S. Miller
1 parent
dc709bd190
Exists in
master
and in
7 other branches
[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>
Showing 1 changed file with 7 additions and 3 deletions Side-by-side Diff
net/sctp/socket.c
... | ... | @@ -1289,9 +1289,13 @@ |
1289 | 1289 | } |
1290 | 1290 | } |
1291 | 1291 | |
1292 | - if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime) | |
1293 | - sctp_primitive_ABORT(asoc, NULL); | |
1294 | - else | |
1292 | + if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime) { | |
1293 | + struct sctp_chunk *chunk; | |
1294 | + | |
1295 | + chunk = sctp_make_abort_user(asoc, NULL, 0); | |
1296 | + if (chunk) | |
1297 | + sctp_primitive_ABORT(asoc, chunk); | |
1298 | + } else | |
1295 | 1299 | sctp_primitive_SHUTDOWN(asoc, NULL); |
1296 | 1300 | } |
1297 | 1301 |