summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctputil.c
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2015-12-06 16:17:57 +0000
committertuexen <tuexen@FreeBSD.org>2015-12-06 16:17:57 +0000
commit23770ab9427614306517b5c1475be90157731cef (patch)
treea643c8a1cec57c56f0ee5a56f08a51cba38a5191 /sys/netinet/sctputil.c
parentbfe5e9c164293f28ef6fa5adf6eb185a85e9731d (diff)
downloadFreeBSD-src-23770ab9427614306517b5c1475be90157731cef.zip
FreeBSD-src-23770ab9427614306517b5c1475be90157731cef.tar.gz
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. MFC after: 1 week
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