Small cleanup, no functional change.
MFC after: 3 days
This commit is contained in:
parent
cae0ecf693
commit
3bcfd10fe1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=332271
@ -705,22 +705,10 @@ sctp_disconnect(struct socket *so)
|
||||
if (SCTP_GET_STATE(asoc) !=
|
||||
SCTP_STATE_COOKIE_WAIT) {
|
||||
/* Left with Data unread */
|
||||
struct mbuf *err;
|
||||
struct mbuf *op_err;
|
||||
|
||||
err = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr), 0, M_NOWAIT, 1, MT_DATA);
|
||||
if (err) {
|
||||
/*
|
||||
* Fill in the user
|
||||
* initiated abort
|
||||
*/
|
||||
struct sctp_paramhdr *ph;
|
||||
|
||||
ph = mtod(err, struct sctp_paramhdr *);
|
||||
SCTP_BUF_LEN(err) = sizeof(struct sctp_paramhdr);
|
||||
ph->param_type = htons(SCTP_CAUSE_USER_INITIATED_ABT);
|
||||
ph->param_length = htons(SCTP_BUF_LEN(err));
|
||||
}
|
||||
sctp_send_abort_tcb(stcb, err, SCTP_SO_LOCKED);
|
||||
op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, "");
|
||||
sctp_send_abort_tcb(stcb, op_err, SCTP_SO_LOCKED);
|
||||
SCTP_STAT_INCR_COUNTER32(sctps_aborted);
|
||||
}
|
||||
SCTP_INP_RUNLOCK(inp);
|
||||
|
Loading…
Reference in New Issue
Block a user