New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 6 users

Issue metadata

Status: Verified
Owner:
User never visited
Closed: Aug 2014
Cc:
Components:
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Support for multiple STUN servers

Reported by alan.f...@gmail.com, May 8 2014 Back to list

Issue description

What steps will reproduce the problem?
1. Configure two STUN servers, where the first one is not reachable, e.g. pcConfig.iceServers = [ {'url':'stun:192.168.0.1:3478'}, {'url':'stun:10.0.0.1:3478'}]
2. Apply this to a new PeerConnection(pcConfig)

What is the expected result?
Both STUN servers will be used to gather ICE candidates.

What do you see instead?
Only the first STUN server is tried. If the first STUN server is unreachable, no server reflexive candidates are gathered.

In Firefox, both STUN servers are used and server reflexive candidates do appear.

What version of the product are you using? On what operating system?
34.0.1847.131

Please provide any additional information below.



 
Project Member

Comment 1 by braveyao@webrtc.org, May 9 2014

Cc: mallinath@webrtc.org
Owner: braveyao@webrtc.org
@mallinath, as I remember, multiple STUN servers are not supported yet, but I couldn't find the relevant issue for it. Is that true? Any issue to track it?
I don't think we have any issue to track it. Let's keep this one.
Project Member

Comment 3 by braveyao@webrtc.org, May 9 2014

Cc: -mallinath@webrtc.org juberti@webrtc.org vikasmarwaha@webrtc.org braveyao@webrtc.org
Owner: mallinath@webrtc.org
Thanks!

Comment 4 by juberti@google.com, Jun 6 2014

Cc: mallinath@webrtc.org
Owner: jiayl@webrtc.org
Project Member

Comment 5 by jiayl@webrtc.org, Jun 6 2014

Should we try to generate candidates for all STUN hosts, or only try the secondary ones if the first one is not reachable?

Comment 6 by juberti@google.com, Jun 6 2014

Status: Assigned
All. The secondary STUN server might be in a different network segment, e.g. in a double-NAT scenario, the first STUN server might be public and the second behind the outermost NAT.

In short, UdpPort should maintain a list of STUN servers and generate candidates for each. It should also generate STUN candidates from any supplied TURN servers as well.

Comment 7 by juberti@google.com, Jun 6 2014

Labels: Area-Transport Area-PeerConnection
Project Member

Comment 8 by jiayl@webrtc.org, Jul 2 2014

Status: Started
Project Member

Comment 9 by bugdroid1@chromium.org, Jul 16 2014

The following revision refers to this bug:
  http://code.google.com/p/webrtc/source/detail?r=6707

------------------------------------------------------------------
r6707 | jiayl@webrtc.org | 2014-07-16T20:55:31.386866Z

Changed paths:
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/connectivitychecker.h&spec=svn6707&r_previous=6706&r=6707&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/httpportallocator.cc&spec=svn6707&r_previous=6706&r=6707&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/basicportallocator.cc&spec=svn6707&r_previous=6706&r=6707&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/stunport_unittest.cc&spec=svn6707&r_previous=6706&r=6707&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/basicportallocator.h&spec=svn6707&r_previous=6706&r=6707&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/stunport.cc&spec=svn6707&r_previous=6706&r=6707&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/stunport.h&spec=svn6707&r_previous=6706&r=6707&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/port_unittest.cc&spec=svn6707&r_previous=6706&r=6707&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/app/webrtc/webrtcsession_unittest.cc&spec=svn6707&r_previous=6706&r=6707&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/p2ptransportchannel_unittest.cc&spec=svn6707&r_previous=6706&r=6707&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/port.h&spec=svn6707&r_previous=6706&r=6707&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/connectivitychecker_unittest.cc&spec=svn6707&r_previous=6706&r=6707&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/connectivitychecker.cc&spec=svn6707&r_previous=6706&r=6707&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/app/webrtc/portallocatorfactory.cc&spec=svn6707&r_previous=6706&r=6707&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/portallocator_unittest.cc&spec=svn6707&r_previous=6706&r=6707&format=side

Add support of multiple STUN servers in UDPPort.
Now UDPPort signals PortComplete or PortError when the Bind requests for all STUN servers are responded or failed. If any STUN bind is successful, PortComplete is signaled; otherwise, PortError is signaled.

I discovered a bug in SocketAddress while working on this. It didn't consider two addresses unequal if they have unresolved IP and different hosts. It's fixed now.

BUG= 3310 
R=mallinath@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/13879004
-----------------------------------------------------------------
Project Member

Comment 10 by bugdroid1@chromium.org, Jul 17 2014

The following revision refers to this bug:
  http://code.google.com/p/webrtc/source/detail?r=6711

------------------------------------------------------------------
r6711 | wu@webrtc.org | 2014-07-17T00:03:24.905323Z

Changed paths:
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/port_unittest.cc&spec=svn6711&r_previous=6710&r=6711&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/app/webrtc/webrtcsession_unittest.cc&spec=svn6711&r_previous=6710&r=6711&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/p2ptransportchannel_unittest.cc&spec=svn6711&r_previous=6710&r=6711&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/port.h&spec=svn6711&r_previous=6710&r=6711&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/connectivitychecker_unittest.cc&spec=svn6711&r_previous=6710&r=6711&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/connectivitychecker.cc&spec=svn6711&r_previous=6710&r=6711&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/app/webrtc/portallocatorfactory.cc&spec=svn6711&r_previous=6710&r=6711&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/portallocator_unittest.cc&spec=svn6711&r_previous=6710&r=6711&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/connectivitychecker.h&spec=svn6711&r_previous=6710&r=6711&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/httpportallocator.cc&spec=svn6711&r_previous=6710&r=6711&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/basicportallocator.cc&spec=svn6711&r_previous=6710&r=6711&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/stunport_unittest.cc&spec=svn6711&r_previous=6710&r=6711&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/basicportallocator.h&spec=svn6711&r_previous=6710&r=6711&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/stunport.cc&spec=svn6711&r_previous=6710&r=6711&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/stunport.h&spec=svn6711&r_previous=6710&r=6711&format=side

Revert 6707 "Add support of multiple STUN servers in UDPPort."

Reason:
Breaks the build on callclient.cc.

> Add support of multiple STUN servers in UDPPort.
> Now UDPPort signals PortComplete or PortError when the Bind requests for all STUN servers are responded or failed. If any STUN bind is successful, PortComplete is signaled; otherwise, PortError is signaled.
> 
> I discovered a bug in SocketAddress while working on this. It didn't consider two addresses unequal if they have unresolved IP and different hosts. It's fixed now.
> 
> BUG= 3310 
> R=mallinath@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/13879004

TBR=jiayl@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/14999004
-----------------------------------------------------------------
Project Member

Comment 11 by bugdroid1@chromium.org, Jul 18 2014

The following revision refers to this bug:
  http://code.google.com/p/webrtc/source/detail?r=6737

------------------------------------------------------------------
r6737 | jiayl@webrtc.org | 2014-07-18T21:34:11.364121Z

Changed paths:
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/connectivitychecker_unittest.cc&spec=svn6737&r_previous=6736&r=6737&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/p2ptransportchannel_unittest.cc&spec=svn6737&r_previous=6736&r=6737&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/connectivitychecker.cc&spec=svn6737&r_previous=6736&r=6737&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/app/webrtc/portallocatorfactory.cc&spec=svn6737&r_previous=6736&r=6737&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/connectivitychecker.h&spec=svn6737&r_previous=6736&r=6737&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/port_unittest.cc&spec=svn6737&r_previous=6736&r=6737&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/app/webrtc/webrtcsession_unittest.cc&spec=svn6737&r_previous=6736&r=6737&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/port.h&spec=svn6737&r_previous=6736&r=6737&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/portallocator_unittest.cc&spec=svn6737&r_previous=6736&r=6737&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/examples/call/callclient.cc&spec=svn6737&r_previous=6736&r=6737&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/httpportallocator.cc&spec=svn6737&r_previous=6736&r=6737&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/basicportallocator.cc&spec=svn6737&r_previous=6736&r=6737&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/basicportallocator.h&spec=svn6737&r_previous=6736&r=6737&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/stunport_unittest.cc&spec=svn6737&r_previous=6736&r=6737&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/stunport.cc&spec=svn6737&r_previous=6736&r=6737&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/stunport.h&spec=svn6737&r_previous=6736&r=6737&format=side

Reland r6707 with the fix for callclient.cc.

TBR=mallinath@webrtc.org
BUG= 3310 

Review URL: https://webrtc-codereview.appspot.com/13039004
-----------------------------------------------------------------
Project Member

Comment 12 by bugdroid1@chromium.org, Jul 18 2014

The following revision refers to this bug:
  http://code.google.com/p/webrtc/source/detail?r=6740

------------------------------------------------------------------
r6740 | jiayl@webrtc.org | 2014-07-18T22:28:36.709986Z

Changed paths:
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/connectivitychecker_unittest.cc&spec=svn6740&r_previous=6739&r=6740&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/p2ptransportchannel_unittest.cc&spec=svn6740&r_previous=6739&r=6740&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/connectivitychecker.cc&spec=svn6740&r_previous=6739&r=6740&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/app/webrtc/portallocatorfactory.cc&spec=svn6740&r_previous=6739&r=6740&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/connectivitychecker.h&spec=svn6740&r_previous=6739&r=6740&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/port_unittest.cc&spec=svn6740&r_previous=6739&r=6740&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/app/webrtc/webrtcsession_unittest.cc&spec=svn6740&r_previous=6739&r=6740&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/port.h&spec=svn6740&r_previous=6739&r=6740&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/portallocator_unittest.cc&spec=svn6740&r_previous=6739&r=6740&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/examples/call/callclient.cc&spec=svn6740&r_previous=6739&r=6740&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/httpportallocator.cc&spec=svn6740&r_previous=6739&r=6740&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/basicportallocator.cc&spec=svn6740&r_previous=6739&r=6740&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/client/basicportallocator.h&spec=svn6740&r_previous=6739&r=6740&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/stunport_unittest.cc&spec=svn6740&r_previous=6739&r=6740&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/stunport.cc&spec=svn6740&r_previous=6739&r=6740&format=side
   M http://code.google.com/p/webrtc/source/diff?path=/trunk/talk/p2p/base/stunport.h&spec=svn6740&r_previous=6739&r=6740&format=side

Revert "Reland r6707 with the fix for callclient.cc."

Breaking pulse build again.
This reverts commit 3e0bb9b5bf7f616000399e24f1d9622ad6b612f9.

TBR=wu@webrtc.org
BUG= 3310 

Review URL: https://webrtc-codereview.appspot.com/17979004
-----------------------------------------------------------------
Project Member

Comment 13 by jiayl@webrtc.org, Jul 22 2014

Labels: Mstone-38
Project Member

Comment 14 by jiayl@webrtc.org, Jul 23 2014

r6768 is the relanded fix.
Project Member

Comment 15 by jiayl@webrtc.org, Aug 4 2014

Correction: it's reverted in r6773, and finally relanded in r6792. Not rolled to Chromium yet.
Project Member

Comment 16 by bugdroid1@chromium.org, Aug 9 2014

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1ee82e2edf9e26fb841ad6d9b14e70e8238e5e4a

commit 1ee82e2edf9e26fb841ad6d9b14e70e8238e5e4a
Author: jiayl@chromium.org <jiayl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Sat Aug 09 06:29:28 2014

Support multiple STUN servers for PeerConnection.

BUG=https://code.google.com/p/webrtc/issues/detail?id=3310

Review URL: https://codereview.chromium.org/445933005

Cr-Commit-Position: refs/heads/master@{#288535}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288535 0039d316-1c4b-4281-b951-d872f2087c98


Project Member

Comment 17 by jiayl@webrtc.org, Aug 11 2014

Status: Fixed
Project Member

Comment 18 by jansson@webrtc.org, Sep 8 2014

Status: Verified
LGTM in 38.0.2125.54
Project Member

Comment 19 by kjellander@webrtc.org, Oct 5 2016

Components: Network
Project Member

Comment 20 by kjellander@webrtc.org, Oct 5 2016

Components: -Transport

Sign in to add a comment