ICE Restart - connection state checking?

415 views
Skip to first unread message

Xander Dumaine

unread,
May 19, 2016, 7:31:22 AM5/19/16
to discuss-webrtc
I'm trying to work out an ICE restart flow wherein the remote side is sending new candidates with updated ufrag and pwd. On my side, I set remoteDescription, createAnswer, setLocalDescription, add the new candidates. After that, ICEConnectionState goes to gathering, new candidates are gathered, then the ICEConnectionState goes to disconnected about 5 seconds later

One red flag I see here is that I don't see ICEConnectionState go to checking after the restart. Any ideas? 
webrtc_internals_dump (11).txt

Philipp Hancke

unread,
May 19, 2016, 7:37:27 AM5/19/16
to discuss...@googlegroups.com
looks like you're adding the same ice candidates including the old generation extension. This might lead to them being ignored so there are no valid pairs.

2016-05-19 13:31 GMT+02:00 Xander Dumaine <xander....@gmail.com>:
I'm trying to work out an ICE restart flow wherein the remote side is sending new candidates with updated ufrag and pwd. On my side, I set remoteDescription, createAnswer, setLocalDescription, add the new candidates. After that, ICEConnectionState goes to gathering, new candidates are gathered, then the ICEConnectionState goes to disconnected about 5 seconds later

One red flag I see here is that I don't see ICEConnectionState go to checking after the restart. Any ideas? 

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/78e16841-21d8-44ce-ae6c-bc5b3e87ec6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Glenn Nethercutt

unread,
May 19, 2016, 9:25:53 AM5/19/16
to discuss-webrtc
The exact same candidates are being offered by the far end, so they are still valid in that respect. Only ufrag and pwd are being updated in this scenario. Would you expect to see generation incremented even if the same ip/port/proto triples are the same?

Philipp Hancke

unread,
May 19, 2016, 9:52:29 AM5/19/16
to discuss...@googlegroups.com
assuming this is still using jingle semantics (generation indicates an ice restart) yes. Also note how chrome generates candidates with generation 1 and 2 in the dump.

Taylor Brandstetter

unread,
May 19, 2016, 1:09:01 PM5/19/16
to discuss...@googlegroups.com
When the first ICE restart occurs, the state doesn't go to "checking" because there's already a working connection. So this doesn't necessarily mean that connectivity checks aren't being sent for the new candidate pairs.

Could you attach a Chrome debug log (preferably in a bug report tagged with WebRTC->Network)? Seeing the STUN packets being sent/received would help get to the bottom of this.

Xander Dumaine

unread,
May 19, 2016, 9:45:21 PM5/19/16
to discuss-webrtc
Attached is a webrtc internals dump with two peer connections, and two wireshark dumps matching. It looks like the STUN binding requests for the ice candidates generated after the restart are done with the *old* ufrag. If you could help me confirm, I will open a bug. It does look like I get the same behavior in Firefox, but I need to confirm.
webrtc_internals_dump (12).txt
wireshark-ice-restart-2.pcapng
wireshark-ice-restart.pcapng

Xander Dumaine

unread,
May 19, 2016, 10:15:01 PM5/19/16
to discuss-webrtc
Reply all
Reply to author
Forward
0 new messages