Re: Issue 173: DTLS handshake packets arrive because of connectivity checks before DTLS transport setup

This issue was originally posted by Robin Raymond:
https://github.com/openpeer/ortc/issues/173

As noted in a previous message, this issue is somewhat complex because it appears possible for incoming media to be received prior to DTLS transport entering the "connected" state (if "connected" requires remote fingerprint verification, which requires calling dtlsTransport.start()).  This can happen because an Offerer might not have yet received the Answer, while the Answerer has received the Offer and verified the Offerer's fingerprint so that the Answerer can send outbound media.  This also raises the question about whether receiver.receive can be called prior to dtlsTransport.start(), so that the incoming media could actually be handled.

Here is Robin's most recent update:


To address original issue: What do we do about DTLS packets that can arrive before there's a DTLS transport to receive the DTLS packets?

This is dependant upon #170<https://github.com/openpeer/ortc/issues/170> . If an RTCIceGatherer can respond to incoming connectivity checks prior to an RTCIceTransport being associated to an RTCDtlsTransport then it is possible incoming DTLS packets to arrive. Here's an example of how this could happen.

var aliceGather = new RTCIceGatherer();

aliceSignal(aliceGatherer.getLocalParameters());



var aliceGathererParams = bobReceiveSignal();

var bobGather = new RTCIceGatherer();

var bobTransport = new RTCIceTransport(bobGatherer);

bobTransport.start(aliceGathererParams);



// alice receives incoming check

aliceGatherer.onremotetransport = function(remoteUsernameFragment) {

  // note: incoming check has arrived, alice associated transport since

  // she doesn't have one yet



  // by associating an IceTransport the incoming connectivity will respond..

  var aliceTransport = new RTCIceTransport(aliceGather);

  // in race possibly before this dtls tranport is setup

  var dtlsTranposrt = new RTCDtlsTransport(aliceTransport);

}

Thus if it's possible to setup a RTCIceTransport AFTER having received the connectivity check will may have to buffer incoming connectivity checks AND DTLS packets.

Received on Friday, 1 May 2015 17:52:01 UTC