summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_usrreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/sctp_usrreq.c')
-rw-r--r--sys/netinet/sctp_usrreq.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c
index f0f2c75..7f9bdf3 100644
--- a/sys/netinet/sctp_usrreq.c
+++ b/sys/netinet/sctp_usrreq.c
@@ -1722,7 +1722,11 @@ sctp_getopt(struct socket *so, int optname, void *optval, size_t *optsize,
int ovh;
SCTP_CHECK_AND_CAST(av, optval, struct sctp_assoc_value, *optsize);
- SCTP_FIND_STCB(inp, stcb, av->assoc_id);
+ if (av->assoc_id) {
+ SCTP_FIND_STCB(inp, stcb, av->assoc_id);
+ } else {
+ stcb = NULL;
+ }
if (stcb) {
av->assoc_value = sctp_get_frag_point(stcb, &stcb->asoc);
OpenPOWER on IntegriCloud