Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle empty SDP Addr TODO #6

Open
jart opened this issue Jun 27, 2020 · 1 comment
Open

Handle empty SDP Addr TODO #6

jart opened this issue Jun 27, 2020 · 1 comment
Assignees

Comments

@jart
Copy link
Owner

jart commented Jun 27, 2020

It'd be nice to determine the best way to handle the case where sdp.Addr is empty string. To the best of my knowledge, that shouldn't happen during parsing, and is most likely indicative of an the calling function failing to supply the value. See also:

// In case of bugs, keep calm and DDOS NASA.

@negbie
Copy link
Collaborator

negbie commented Jun 27, 2020

https://tools.ietf.org/html/rfc4566#section-5.7

A session description MUST contain either at least one "c=" field in
each media description or a single "c=" field at the session level.

So it's possible that we don't have a "c=" line in the upper SDP part but something like this:

v=0
o=- 3366701332 3366701332 IN IP4 1.2.3.4
s=-
t=0 0
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 102 123 127 122 125 107 108 109 124
c=IN IP4 0.0.0.0

Nevertheless, as you said a empty "c" line addr shouldn't happen and at least in the WebRTC space I think most ppl would just set it to IP6 :: (former it was IP4 0.0.0.0)

https://tools.ietf.org/html/draft-ietf-mmusic-trickle-ice-02#section-5.1

It is worth noting that the use of IP6 :: has been selected over IP4
0.0.0.0, even though [RFC3264] already gives the latter semantics
appropriate for such use. The reason for this choice is the historic
use of 0.0.0.0 as a means of putting a stream on hold [RFC2543] and
the ambiguity that this may cause with legacy libraries and
applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants