summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_input.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2016-02-21 13:49:26 +0000
committerdim <dim@FreeBSD.org>2016-02-21 13:49:26 +0000
commit2e1a0cbbd8f5a5ca7ec73c85311451ed1ac4242c (patch)
treebb5f550a5fd2ee1357495987f5076839273e5998 /sys/netinet/sctp_input.c
parentf393760a8a7c87242739a64002290b7bda94cb27 (diff)
parent579b7ad49fdbcb4dd1e016603c5d0774b32c12d1 (diff)
downloadFreeBSD-src-2e1a0cbbd8f5a5ca7ec73c85311451ed1ac4242c.zip
FreeBSD-src-2e1a0cbbd8f5a5ca7ec73c85311451ed1ac4242c.tar.gz
Merge ^/head r295601 through r295844.
Diffstat (limited to 'sys/netinet/sctp_input.c')
-rw-r--r--sys/netinet/sctp_input.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c
index a6f625d..a205f2f 100644
--- a/sys/netinet/sctp_input.c
+++ b/sys/netinet/sctp_input.c
@@ -365,8 +365,10 @@ sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb)
}
SCTP_TCB_SEND_UNLOCK(stcb);
asoc->streamoutcnt = asoc->pre_open_streams;
- for (i = 0; i < asoc->streamoutcnt; i++) {
- asoc->strmout[i].state = SCTP_STREAM_OPEN;
+ if (asoc->strmout) {
+ for (i = 0; i < asoc->streamoutcnt; i++) {
+ asoc->strmout[i].state = SCTP_STREAM_OPEN;
+ }
}
/* EY - nr_sack: initialize highest tsn in nr_mapping_array */
asoc->highest_tsn_inside_nr_map = asoc->highest_tsn_inside_map;
@@ -909,7 +911,9 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp,
return;
}
#endif
- sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket);
+ if (stcb->sctp_socket) {
+ sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket);
+ }
#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
SCTP_SOCKET_UNLOCK(so, 1);
#endif
@@ -4858,7 +4862,7 @@ process_control_chunks:
if ((stcb) && (stcb->asoc.total_output_queue_size)) {
;
} else {
- if (locked_tcb != stcb) {
+ if ((locked_tcb != NULL) && (locked_tcb != stcb)) {
/* Very unlikely */
SCTP_TCB_UNLOCK(locked_tcb);
}
OpenPOWER on IntegriCloud