Datachannel streams should be larger than u16

RESOLVED FIXED in mozilla27

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: ehugg, Assigned: ehugg)

Tracking

Trunk
mozilla27
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
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)

Updated

5 years ago
Assignee: nobody → ethanhugg
(Assignee)

Comment 1

5 years ago
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.
(Assignee)

Comment 2

5 years ago
Created attachment 819229 [details] [diff] [review]
Datachannel streams should be kept in the range 1 to MAX_NUM_STREAMS
(Assignee)

Comment 3

5 years ago
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)

Updated

5 years ago
Attachment #819229 - Flags: review?(rjesup) → review+
(Assignee)

Comment 4

5 years ago
Doing a try run since the include path was changed:

https://tbpl.mozilla.org/?tree=Try&rev=2707caa1fa2d
(Assignee)

Comment 5

5 years ago
Try looks good, requesting checkin.
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a75117d380f
Keywords: checkin-needed
Target Milestone: --- → mozilla27
https://hg.mozilla.org/mozilla-central/rev/1a75117d380f
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.