diff options
author | Michael Tuexen <tuexen@FreeBSD.org> | 2013-07-05 10:08:49 +0000 |
---|---|---|
committer | Michael Tuexen <tuexen@FreeBSD.org> | 2013-07-05 10:08:49 +0000 |
commit | ee1ccd9258ef20d9498ffd169911c85bbe027dd2 (patch) | |
tree | 24f76f667f91a8f94ea6f08b0b93c699153065e7 /sys/netinet/sctp_input.c | |
parent | 542dd84bad18e55198d1a21d87a29f64ab5e1951 (diff) | |
download | src-ee1ccd9258ef20d9498ffd169911c85bbe027dd2.tar.gz src-ee1ccd9258ef20d9498ffd169911c85bbe027dd2.zip |
Notes
Diffstat (limited to 'sys/netinet/sctp_input.c')
-rw-r--r-- | sys/netinet/sctp_input.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index c19464f15584..361c6b3d7ac7 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -389,9 +389,10 @@ sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb) } SCTP_FREE(asoc->strmin, SCTP_M_STRMI); } - asoc->streamincnt = ntohs(init->num_outbound_streams); - if (asoc->streamincnt > MAX_SCTP_STREAMS) { - asoc->streamincnt = MAX_SCTP_STREAMS; + if (asoc->max_inbound_streams > ntohs(init->num_outbound_streams)) { + asoc->streamincnt = ntohs(init->num_outbound_streams); + } else { + asoc->streamincnt = asoc->max_inbound_streams; } SCTP_MALLOC(asoc->strmin, struct sctp_stream_in *, asoc->streamincnt * sizeof(struct sctp_stream_in), SCTP_M_STRMI); @@ -403,11 +404,6 @@ sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb) for (i = 0; i < asoc->streamincnt; i++) { asoc->strmin[i].stream_no = i; asoc->strmin[i].last_sequence_delivered = 0xffff; - /* - * U-stream ranges will be set when the cookie is unpacked. - * Or for the INIT sender they are un set (if pr-sctp not - * supported) when the INIT-ACK arrives. - */ TAILQ_INIT(&asoc->strmin[i].inqueue); asoc->strmin[i].delivery_started = 0; } |