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

Unified Diff: webrtc/p2p/base/turnserver.cc

Issue 1415313004: Destroy a Connection if a CreatePermission request fails. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Remove "friend" relationship between TurnEntry and Connection. Created 5 years, 1 month 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/turnport.cc ('K') | « webrtc/p2p/base/turnserver.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/turnserver.cc
diff --git a/webrtc/p2p/base/turnserver.cc b/webrtc/p2p/base/turnserver.cc
index 8d40a9030c43260f00e54a88029e3878c904664a..1502cdd52eda2e71c64be059d576bb6b006ba8fc 100644
--- a/webrtc/p2p/base/turnserver.cc
+++ b/webrtc/p2p/base/turnserver.cc
@@ -698,6 +698,12 @@ void TurnServerAllocation::HandleCreatePermissionRequest(
return;
}
+ if (server_->reject_private_addresses_ &&
+ rtc::IPIsPrivate(peer_attr->GetAddress().ipaddr())) {
+ SendErrorResponse(msg, STUN_ERROR_FORBIDDEN, STUN_ERROR_REASON_FORBIDDEN);
+ return;
+ }
+
// Add this permission.
AddPermission(peer_attr->GetAddress().ipaddr());
« webrtc/p2p/base/turnport.cc ('K') | « webrtc/p2p/base/turnserver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698