Skip to content

Commit

Permalink
[SCTP]: Fix sctp_primitive_ABORT() call in sctp_close().
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Sridhar Samudrala authored and David S. Miller committed Aug 30, 2006
1 parent dc709bd commit b9ac867
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions net/sctp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1289,9 +1289,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);
}

Expand Down

0 comments on commit b9ac867

Please sign in to comment.