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

Unified Diff: webrtc/p2p/base/portallocator.h

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
« no previous file with comments | « no previous file | webrtc/p2p/client/basicportallocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/portallocator.h
diff --git a/webrtc/p2p/base/portallocator.h b/webrtc/p2p/base/portallocator.h
index c89684727b72c475df46f770fe3845934d70dbcb..b754376d89af3ae6d4eb4af2d565dcb6f47db169 100644
--- a/webrtc/p2p/base/portallocator.h
+++ b/webrtc/p2p/base/portallocator.h
@@ -28,9 +28,13 @@ namespace cricket {
// what kinds of ports are allocated.
enum {
+ // Disable local UDP ports. This doesn't impact how we connect to relay
+ // servers.
PORTALLOCATOR_DISABLE_UDP = 0x01,
PORTALLOCATOR_DISABLE_STUN = 0x02,
PORTALLOCATOR_DISABLE_RELAY = 0x04,
+ // Disable local TCP ports. This doesn't impact how we connect to relay
+ // servers.
PORTALLOCATOR_DISABLE_TCP = 0x08,
PORTALLOCATOR_ENABLE_SHAKER = 0x10,
PORTALLOCATOR_ENABLE_IPV6 = 0x40,
@@ -46,6 +50,9 @@ enum {
// When specified, a loopback candidate will be generated if
// PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION is specified.
PORTALLOCATOR_ENABLE_LOCALHOST_CANDIDATE = 0x800,
+ // Disallow use of UDP when connecting to a relay server. Since proxy servers
+ // usually don't handle UDP, using UDP will leak the IP address.
+ PORTALLOCATOR_DISABLE_UDP_RELAY = 0x1000,
};
const uint32 kDefaultPortAllocatorFlags = 0;
« no previous file with comments | « no previous file | webrtc/p2p/client/basicportallocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698