summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctputil.c
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2016-01-17 12:15:41 +0000
committertuexen <tuexen@FreeBSD.org>2016-01-17 12:15:41 +0000
commit70ab0ed557e2bfba1ee7f7e04ef56422a59c1d78 (patch)
treec1c63fbc506f1285a8adfdf574e9cda2d4f0b203 /sys/netinet/sctputil.c
parent08b1ba6353e118296055ace26ff500a2fc2eda57 (diff)
downloadFreeBSD-src-70ab0ed557e2bfba1ee7f7e04ef56422a59c1d78.zip
FreeBSD-src-70ab0ed557e2bfba1ee7f7e04ef56422a59c1d78.tar.gz
MFC r291904:
Fix the allocation of outgoing streams: * When processing a cookie, use the number of streams announced in the INIT-ACK. * When sending an INIT-ACK for an existing association, use the value from the association, not from the end-point.
Diffstat (limited to 'sys/netinet/sctputil.c')
-rw-r--r--sys/netinet/sctputil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c
index 8d8f375..f2e9457 100644
--- a/sys/netinet/sctputil.c
+++ b/sys/netinet/sctputil.c
@@ -938,7 +938,7 @@ sctp_map_assoc_state(int kernel_state)
int
sctp_init_asoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
- uint32_t override_tag, uint32_t vrf_id)
+ uint32_t override_tag, uint32_t vrf_id, uint16_t o_strms)
{
struct sctp_association *asoc;
@@ -1100,7 +1100,7 @@ sctp_init_asoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
* that we request by default.
*/
asoc->strm_realoutsize = asoc->streamoutcnt = asoc->pre_open_streams =
- inp->sctp_ep.pre_open_stream_count;
+ o_strms;
SCTP_MALLOC(asoc->strmout, struct sctp_stream_out *,
asoc->streamoutcnt * sizeof(struct sctp_stream_out),
SCTP_M_STRMO);
OpenPOWER on IntegriCloud