summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_output.c
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-08-25 10:40:54 -0300
committerRenato Botelho <renato@netgate.com>2016-08-25 10:40:54 -0300
commit5f4dbd408a354e294fdffc23ee889af03b7cfc28 (patch)
tree2d140e0691c400a324f9da94ed1282ab1a1c8710 /sys/netinet/sctp_output.c
parentff37ccbef82fdcee6f5306945547bc8541986a03 (diff)
parent986f593e4573a0f751ae6fa39b49e0a0dcbefbf8 (diff)
downloadFreeBSD-src-5f4dbd408a354e294fdffc23ee889af03b7cfc28.zip
FreeBSD-src-5f4dbd408a354e294fdffc23ee889af03b7cfc28.tar.gz
Merge remote-tracking branch 'origin/stable/11' into devel-11
Diffstat (limited to 'sys/netinet/sctp_output.c')
-rw-r--r--sys/netinet/sctp_output.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index 621b25e..88c0895 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -12639,7 +12639,10 @@ sctp_lower_sosend(struct socket *so,
}
SCTP_INP_RUNLOCK(inp);
} else if (sinfo_assoc_id) {
- stcb = sctp_findassociation_ep_asocid(inp, sinfo_assoc_id, 0);
+ stcb = sctp_findassociation_ep_asocid(inp, sinfo_assoc_id, 1);
+ if (stcb != NULL) {
+ hold_tcblock = 1;
+ }
} else if (addr) {
/*-
* Since we did not use findep we must
@@ -13404,6 +13407,10 @@ skip_preblock:
}
}
SCTP_TCB_SEND_LOCK(stcb);
+ if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
+ SCTP_TCB_SEND_UNLOCK(stcb);
+ goto out_unlocked;
+ }
if (sp) {
if (sp->msg_is_complete == 0) {
strm->last_msg_incomplete = 1;
OpenPOWER on IntegriCloud