Datachannel streams should be larger than u16

RESOLVED FIXED in mozilla27

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: ehugg, Assigned: ehugg)

Tracking

Trunk
mozilla27
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Chrome canary is sending us this:

a=sctpmap:5000 webrtc-datachannel 65536

And we are responding with

a=sctpmap:5000 webrtc-datachannel 0

because we are storing this value in 16 bits.  We should move to a larger unsigned type.
Assignee: nobody → ethanhugg
Via correspondence with Jesup over email it appears that we should be limiting this to MAX_NUM_STREAMS instead.  This value is defined in DataChannelProtocol.h

#define MAX_NUM_STREAMS (2048)

So I think we should be reflecting the value of streams unless it is greater than MAX_NUM_STREAMS, in which case we should return the MAX_NUM_STREAMS value.   Perhaps I should also be checking for < 1 and setting to 1 in that case as well.
Comment on attachment 819229 [details] [diff] [review]
Datachannel streams should be kept in the range 1 to MAX_NUM_STREAMS


Tested by building with WEBRTC_DATACHANNEL_STREAMS_DEFAULT to 65536.
Attachment #819229 - Flags: review?(rjesup)
Attachment #819229 - Flags: review?(rjesup) → review+
Doing a try run since the include path was changed:

https://tbpl.mozilla.org/?tree=Try&rev=2707caa1fa2d
Try looks good, requesting checkin.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/1a75117d380f
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.