Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Issue 1215713003: Ensuring that UDP TURN servers are always used as STUN servers. (Closed)

Created:
5 years, 6 months ago by Taylor Brandstetter
Modified:
5 years, 4 months ago
Reviewers:
pthatcher1
CC:
tterriberry_mozilla.com, webrtc-reviews_webrtc.org
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Ensuring that UDP TURN servers are always used as STUN servers. This was already working in most cases, but not for some corner cases: * If the PORTALLOCATOR_ENABLE_SHARED_SOCKET flag is not set * If both a STUN server and TURN server are configured I added unit tests for these cases, and centralized the code that gets STUN server addresses in order to fix these and any related issues. BUG=webrtc:4215 Committed: https://crrev.com/c5d0d95fd8957a7a6645b1196e5f1e9cee33525c Cr-Commit-Position: refs/heads/master@{#9596}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Actually use non-shared socket mode for unit test, as intended. #

Total comments: 12

Patch Set 3 : Responding to comments #

Patch Set 4 : Use const ref to avoid unnecessary copies #

Total comments: 2

Patch Set 5 : Fixing code formatting #

Patch Set 6 : Making NAT server support TCP connections, so that TURN TCP test can be more robust. #

Patch Set 7 : Fixing compiler warning, and memory leak in NAT unit test #

Total comments: 8

Patch Set 8 : Fixing some code style issues, and bugs with BufferedReadAdapter and the TCP NAT interface #

Total comments: 1

Patch Set 9 : Adding some comments to make logic in BufferedReadAdapter a bit more clear #

Patch Set 10 : Fixing compiler warning from size_t->int cast #

Unified diffs Side-by-side diffs Delta from patch set Stats (+340 lines, -95 lines) Patch
M webrtc/base/nat_unittest.cc View 1 2 3 4 5 6 7 5 chunks +70 lines, -32 lines 0 comments Download
M webrtc/base/natserver.h View 1 2 3 4 5 6 7 3 chunks +26 lines, -12 lines 0 comments Download
M webrtc/base/natserver.cc View 1 2 3 4 5 6 7 6 chunks +74 lines, -11 lines 0 comments Download
M webrtc/base/natsocketfactory.h View 1 2 3 4 5 3 chunks +6 lines, -4 lines 0 comments Download
M webrtc/base/natsocketfactory.cc View 1 2 3 4 5 6 7 8 chunks +15 lines, -9 lines 0 comments Download
M webrtc/base/proxyserver.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M webrtc/base/proxyserver.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M webrtc/base/socketadapters.cc View 1 2 3 4 5 6 7 8 9 1 chunk +11 lines, -3 lines 0 comments Download
M webrtc/p2p/base/port_unittest.cc View 1 2 3 4 5 3 chunks +5 lines, -5 lines 0 comments Download
M webrtc/p2p/client/basicportallocator.h View 1 chunk +2 lines, -1 line 0 comments Download
M webrtc/p2p/client/basicportallocator.cc View 1 2 3 4 5 3 chunks +8 lines, -9 lines 0 comments Download
M webrtc/p2p/client/portallocator_unittest.cc View 1 2 3 4 5 9 chunks +116 lines, -9 lines 0 comments Download

Messages

Total messages: 33 (11 generated)
juberti1
I think this doesn't solve the core problem, which is that the code at https://code.google.com/p/chromium/codesearch#chromium/src/content/renderer/media/webrtc/peer_connection_dependency_factory.cc&q=peer_connection_dependency_factory.cc&sq=package:chromium&type=cs&l=146 ...
5 years, 6 months ago (2015-06-26 18:50:34 UTC) #2
Taylor Brandstetter
On 2015/06/26 18:50:34, juberti1 wrote: > I think this doesn't solve the core problem, which ...
5 years, 6 months ago (2015-06-26 19:37:35 UTC) #3
Taylor Brandstetter
5 years, 6 months ago (2015-06-26 20:19:39 UTC) #5
juberti1
https://codereview.webrtc.org/1215713003/diff/1/webrtc/p2p/client/portallocator_unittest.cc File webrtc/p2p/client/portallocator_unittest.cc (right): https://codereview.webrtc.org/1215713003/diff/1/webrtc/p2p/client/portallocator_unittest.cc#newcode953 webrtc/p2p/client/portallocator_unittest.cc:953: // Don't bother waiting for STUN timeout, since we ...
5 years, 6 months ago (2015-06-27 04:39:54 UTC) #7
Taylor Brandstetter
As per Justin's commit, I plan to try making a test with two layers of ...
5 years, 5 months ago (2015-06-27 17:05:50 UTC) #8
juberti1
https://codereview.webrtc.org/1215713003/diff/1/webrtc/p2p/client/portallocator_unittest.cc File webrtc/p2p/client/portallocator_unittest.cc (right): https://codereview.webrtc.org/1215713003/diff/1/webrtc/p2p/client/portallocator_unittest.cc#newcode953 webrtc/p2p/client/portallocator_unittest.cc:953: // Don't bother waiting for STUN timeout, since we ...
5 years, 5 months ago (2015-06-29 18:40:00 UTC) #9
juberti1
> https://codereview.webrtc.org/1215713003/diff/1/webrtc/p2p/client/portallocator_unittest.cc#newcode959 > webrtc/p2p/client/portallocator_unittest.cc:959: // expect two ports, a UDPPort and TurnPort. > On 2015/06/27 ...
5 years, 5 months ago (2015-06-29 18:54:37 UTC) #10
juberti1
https://codereview.webrtc.org/1215713003/diff/20001/webrtc/p2p/client/basicportallocator.cc File webrtc/p2p/client/basicportallocator.cc (right): https://codereview.webrtc.org/1215713003/diff/20001/webrtc/p2p/client/basicportallocator.cc#newcode1167 webrtc/p2p/client/basicportallocator.cc:1167: for (ServerAddresses::iterator turn_server = turn_servers.begin(); I think this could ...
5 years, 5 months ago (2015-06-29 18:54:49 UTC) #11
Taylor Brandstetter
https://codereview.webrtc.org/1215713003/diff/1/webrtc/p2p/client/portallocator_unittest.cc File webrtc/p2p/client/portallocator_unittest.cc (right): https://codereview.webrtc.org/1215713003/diff/1/webrtc/p2p/client/portallocator_unittest.cc#newcode953 webrtc/p2p/client/portallocator_unittest.cc:953: // Don't bother waiting for STUN timeout, since we ...
5 years, 5 months ago (2015-06-29 20:18:35 UTC) #12
juberti1
On 2015/06/29 at 20:18:35, deadbeef wrote: > https://codereview.webrtc.org/1215713003/diff/1/webrtc/p2p/client/portallocator_unittest.cc > File webrtc/p2p/client/portallocator_unittest.cc (right): > > https://codereview.webrtc.org/1215713003/diff/1/webrtc/p2p/client/portallocator_unittest.cc#newcode953 ...
5 years, 5 months ago (2015-06-29 20:25:02 UTC) #13
pthatcher1
https://codereview.webrtc.org/1215713003/diff/20001/webrtc/p2p/client/basicportallocator.cc File webrtc/p2p/client/basicportallocator.cc (right): https://codereview.webrtc.org/1215713003/diff/20001/webrtc/p2p/client/basicportallocator.cc#newcode928 webrtc/p2p/client/basicportallocator.cc:928: if (config_ && !config_->StunServers().empty()) { Does it make sense ...
5 years, 5 months ago (2015-07-06 22:28:32 UTC) #16
Taylor Brandstetter
https://codereview.webrtc.org/1215713003/diff/20001/webrtc/p2p/client/basicportallocator.cc File webrtc/p2p/client/basicportallocator.cc (right): https://codereview.webrtc.org/1215713003/diff/20001/webrtc/p2p/client/basicportallocator.cc#newcode928 webrtc/p2p/client/basicportallocator.cc:928: if (config_ && !config_->StunServers().empty()) { On 2015/07/06 22:28:32, pthatcher1 ...
5 years, 5 months ago (2015-07-07 00:00:04 UTC) #18
pthatcher1
On 2015/07/07 00:00:04, Taylor Brandstetter wrote: > https://codereview.webrtc.org/1215713003/diff/20001/webrtc/p2p/client/basicportallocator.cc > File webrtc/p2p/client/basicportallocator.cc (right): > > https://codereview.webrtc.org/1215713003/diff/20001/webrtc/p2p/client/basicportallocator.cc#newcode928 ...
5 years, 5 months ago (2015-07-07 06:06:09 UTC) #19
Taylor Brandstetter
All comments should be addressed now. I got TCP working through the NATServer, using the ...
5 years, 5 months ago (2015-07-13 23:23:41 UTC) #20
pthatcher1
https://codereview.webrtc.org/1215713003/diff/120001/webrtc/base/natserver.cc File webrtc/base/natserver.cc (right): https://codereview.webrtc.org/1215713003/diff/120001/webrtc/base/natserver.cc#newcode83 webrtc/base/natserver.cc:83: if (*len < kNATEncodedIPv6AddressSize) Please use {}s (consistent with ...
5 years, 5 months ago (2015-07-15 18:22:40 UTC) #21
Taylor Brandstetter
I addressed your comments, and I also fixed a bug with the TCP NAT interface, ...
5 years, 5 months ago (2015-07-15 19:44:23 UTC) #22
pthatcher1
lgtm If you want to cleanup the last item, it's up to you. https://codereview.webrtc.org/1215713003/diff/140001/webrtc/base/socketadapters.cc File ...
5 years, 5 months ago (2015-07-15 23:42:24 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1215713003/160001
5 years, 5 months ago (2015-07-16 01:23:24 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: win_x64_rel on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/win_x64_rel/builds/8408)
5 years, 5 months ago (2015-07-16 01:27:08 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1215713003/180001
5 years, 5 months ago (2015-07-16 16:22:16 UTC) #31
commit-bot: I haz the power
Committed patchset #10 (id:180001)
5 years, 5 months ago (2015-07-16 17:22:27 UTC) #32
commit-bot: I haz the power
5 years, 5 months ago (2015-07-16 17:22:40 UTC) #33
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/c5d0d95fd8957a7a6645b1196e5f1e9cee33525c
Cr-Commit-Position: refs/heads/master@{#9596}

Powered by Google App Engine
This is Rietveld 408576698