aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/sctp_input.c
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2017-12-13 17:11:57 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2017-12-13 17:11:57 +0000
commitcd6340caf7fc1a16df6a50403c1e60b2fc67c6ec (patch)
treedd98ee0fe9e2a815e606d471f15103238c0b983f /sys/netinet/sctp_input.c
parent62cf53fdaca3b3d69c27d345e7b67a886cc092d3 (diff)
Notes
Diffstat (limited to 'sys/netinet/sctp_input.c')
-rw-r--r--sys/netinet/sctp_input.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c
index bb9b84603e895..d82a962c6c1ba 100644
--- a/sys/netinet/sctp_input.c
+++ b/sys/netinet/sctp_input.c
@@ -3207,9 +3207,9 @@ sctp_handle_ecn_cwr(struct sctp_cwr_chunk *cp, struct sctp_tcb *stcb, struct sct
stcb->asoc.ecn_echo_cnt_onq--;
TAILQ_REMOVE(&stcb->asoc.control_send_queue, chk,
sctp_next);
+ stcb->asoc.ctrl_queue_cnt--;
sctp_m_freem(chk->data);
chk->data = NULL;
- stcb->asoc.ctrl_queue_cnt--;
sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
if (override == 0) {
break;
@@ -3641,26 +3641,23 @@ static void
sctp_clean_up_stream_reset(struct sctp_tcb *stcb)
{
struct sctp_association *asoc;
- struct sctp_tmit_chunk *chk = stcb->asoc.str_reset;
+ struct sctp_tmit_chunk *chk;
- if (stcb->asoc.str_reset == NULL) {
+ asoc = &stcb->asoc;
+ chk = asoc->str_reset;
+ if (chk == NULL) {
return;
}
- asoc = &stcb->asoc;
-
+ asoc->str_reset = NULL;
sctp_timer_stop(SCTP_TIMER_TYPE_STRRESET, stcb->sctp_ep, stcb,
chk->whoTo, SCTP_FROM_SCTP_INPUT + SCTP_LOC_28);
- TAILQ_REMOVE(&asoc->control_send_queue,
- chk,
- sctp_next);
+ TAILQ_REMOVE(&asoc->control_send_queue, chk, sctp_next);
+ asoc->ctrl_queue_cnt--;
if (chk->data) {
sctp_m_freem(chk->data);
chk->data = NULL;
}
- asoc->ctrl_queue_cnt--;
sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
- /* sa_ignore NO_NULL_CHK */
- stcb->asoc.str_reset = NULL;
}