Changeset 247430 in webkit


Ignore:
Timestamp:
Jul 15, 2019 7:32:48 AM (5 years ago)
Author:
youenn@apple.com
Message:

Filter SDP c lines
https://bugs.webkit.org/show_bug.cgi?id=199791

Reviewed by Eric Carlson.

Source/WebCore:

As discussed in https://github.com/rtcweb-wg/mdns-ice-candidates/issues/91,
use 0.0.0.0 for c lines when filtering the SDP.
Covered by updated test.

  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::PeerConnectionBackend::filterSDP const):

LayoutTests:

  • webrtc/datachannel/filter-ice-candidate.html:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r247422 r247430  
     12019-07-15  Youenn Fablet  <youenn@apple.com>
     2
     3        Filter SDP c lines
     4        https://bugs.webkit.org/show_bug.cgi?id=199791
     5
     6        Reviewed by Eric Carlson.
     7
     8        * webrtc/datachannel/filter-ice-candidate.html:
     9
    1102019-07-14  Dean Jackson  <dino@apple.com>
    211
  • trunk/LayoutTests/webrtc/datachannel/filter-ice-candidate.html

    r218408 r247430  
    2525            }
    2626            assert_equals(pc.localDescription.sdp.indexOf("a=candidate"), -1);
     27            assert_true(pc.localDescription.sdp.indexOf("c=IN IP4 0.0.0.0") != -1 || pc.localDescription.sdp.indexOf("c=IN IP6 ::") != -1);
    2728            if (counter === 0) {
    2829                pc.createOffer().then((offer) => {
     30                    assert_true(offer.sdp.indexOf("c=IN IP4 0.0.0.0") != -1 || pc.localDescription.sdp.indexOf("c=IN IP6 ::") != -1);
    2931                    assert_equals(offer.sdp.indexOf("a=candidate"), -1);
    3032                    resolve();
     
    5557                return;
    5658            }
     59            assert_true(pc.localDescription.sdp.indexOf("c=IN IP4 0.0.0.0") == -1 && pc.localDescription.sdp.indexOf("c=IN IP6 ::") === -1);
    5760            assert_false(pc.localDescription.sdp.indexOf("a=candidate") === -1);
    5861            if (counter !== 0) {
    5962                // Redoing an offer now that we have some candidates.
    6063                pc.createOffer().then((offer) => {
     64                    assert_true(offer.sdp.indexOf("c=IN IP4 0.0.0.0") == -1 && pc.localDescription.sdp.indexOf("c=IN IP6 ::") === -1);
    6165                    assert_false(offer.sdp.indexOf("a=candidate") === -1);
    6266                    resolve();
  • trunk/Source/WebCore/ChangeLog

    r247429 r247430  
     12019-07-15  Youenn Fablet  <youenn@apple.com>
     2
     3        Filter SDP c lines
     4        https://bugs.webkit.org/show_bug.cgi?id=199791
     5
     6        Reviewed by Eric Carlson.
     7
     8        As discussed in https://github.com/rtcweb-wg/mdns-ice-candidates/issues/91,
     9        use 0.0.0.0 for c lines when filtering the SDP.
     10        Covered by updated test.
     11
     12        * Modules/mediastream/PeerConnectionBackend.cpp:
     13        (WebCore::PeerConnectionBackend::filterSDP const):
     14
    1152019-07-15  Zalan Bujtas  <zalan@apple.com>
    216
  • trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp

    r244736 r247430  
    413413    StringBuilder filteredSDP;
    414414    sdp.split('\n', [&filteredSDP](StringView line) {
    415         if (!line.startsWith("a=candidate"))
     415        if (line.startsWith("c=IN IP4"))
     416            filteredSDP.append("c=IN IP4 0.0.0.0");
     417        else if (line.startsWith("c=IN IP6"))
     418            filteredSDP.append("c=IN IP6 ::");
     419        else if (!line.startsWith("a=candidate"))
    416420            filteredSDP.append(line);
    417421        else if (line.find(" host ", 11) == notFound)
Note: See TracChangeset for help on using the changeset viewer.