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

Unified Diff: webrtc/p2p/client/basicportallocator.cc

Issue 1311153003: Add check to prevent TURN usage if the protocol is not allowed. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« webrtc/p2p/base/portallocator.h ('K') | « webrtc/p2p/base/portallocator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/client/basicportallocator.cc
diff --git a/webrtc/p2p/client/basicportallocator.cc b/webrtc/p2p/client/basicportallocator.cc
index 2a9ee3b8ba063cdb987dc25cf89c680a6b67280e..55e0eb3c3f9d27da89cb5e5b1e617e053c5afea9 100644
--- a/webrtc/p2p/client/basicportallocator.cc
+++ b/webrtc/p2p/client/basicportallocator.cc
@@ -983,6 +983,13 @@ void AllocationSequence::CreateTurnPort(const RelayServerConfig& config) {
for (relay_port = config.ports.begin();
relay_port != config.ports.end(); ++relay_port) {
TurnPort* port = NULL;
+
+ // Skip the turn server that uses disallowed protocol.
pthatcher1 2015/08/25 22:59:30 Might be more clear as "Skip UDP connections to re
+ if (IsFlagSet(PORTALLOCATOR_DISABLE_TURN_OVER_UDP) &&
+ relay_port->proto == PROTO_UDP) {
+ continue;
+ }
+
// Shared socket mode must be enabled only for UDP based ports. Hence
// don't pass shared socket for ports which will create TCP sockets.
// TODO(mallinath) - Enable shared socket mode for TURN ports. Disabled
« webrtc/p2p/base/portallocator.h ('K') | « webrtc/p2p/base/portallocator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698