Skip to content

Limit datachannel IDs based on SCTP stream Ids#3405

Open
pando-emil wants to merge 1 commit intopion:mainfrom
pando-emil:limit-datachannels-to-sctp-limits
Open

Limit datachannel IDs based on SCTP stream Ids#3405
pando-emil wants to merge 1 commit intopion:mainfrom
pando-emil:limit-datachannels-to-sctp-limits

Conversation

@pando-emil
Copy link
Copy Markdown

NOTE! This patch depends on a corresponding patch in sctp (pion/sctp#463) that adds the numInboundStreams, numOutboundStreams and OnStreamResetComplete functions on Association.

When an SCTP association is setup, the number of streams in each direction is "negotiated" between the peers. The max number of streams also determines the maximum ID a stream can be identified as.

This patch makes sure to not trying to use stream IDs outside the valid range.

The patch also makes sure IDs can be reused after reset. Before this patch, you could never open datachannels more than 65535 / 2 times within a session, even you only have one in use at a time.

NOTE! This patch depends on a corresponding patch in sctp that adds the
numInboundStreams, numOutboundStreams and OnStreamResetComplete
functions on Association.

When an SCTP association is setup, the number of streams in each
direction is "negotiated" between the peers. The max number of streams
also determines the maximum ID a stream can be identified as.

This patch makes sure to not trying to use stream IDs outside the valid
range.

The patch also makes sure IDs can be reused after reset. Before this patch, you
could never open datachannels more than 65535 / 2 times within a
session, even you only have one in use at a time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant