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

Unified Diff: content/browser/renderer_host/p2p/socket_host_tcp.cc

Issue 7529039: Properly handle STUN requests and responses from relay servers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 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
Index: content/browser/renderer_host/p2p/socket_host_tcp.cc
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp.cc b/content/browser/renderer_host/p2p/socket_host_tcp.cc
index 250de53b5de10dcd3875fab77279754e1d9706d2..56d74a2fac4c052276813712a131664b59c3cc15 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp.cc
+++ b/content/browser/renderer_host/p2p/socket_host_tcp.cc
@@ -138,8 +138,7 @@ void P2PSocketHostTcp::OnPacket(std::vector<char>& data) {
if (!authorized_) {
P2PSocketHost::StunMessageType type;
bool stun = GetStunPacketType(&*data.begin(), data.size(), &type);
- if (stun && (type == STUN_BINDING_REQUEST ||
- type == STUN_BINDING_RESPONSE)) {
+ if (stun && IsRequestOrResponse(type)) {
Wez 2011/08/09 18:09:23 How does receipt of a binding/allocate request/res
Sergey Ulanov 2011/08/09 18:15:41 By sending/receiving the stun request or response
Wez 2011/08/09 18:30:57 The only effect that |authorized_| seems to have i
Sergey Ulanov 2011/08/09 19:18:26 We do block incoming data packets before stun requ
Wez 2011/08/09 19:54:50 Sorry; forgot about the |!authorized_| surrounding
Sergey Ulanov 2011/08/09 21:06:56 Ok, connected sounds good. I will rename it in a s
authorized_ = true;
} else if (!stun || type == STUN_DATA_INDICATION) {
LOG(ERROR) << "Received unexpected data packet from "
« no previous file with comments | « content/browser/renderer_host/p2p/socket_host.cc ('k') | content/browser/renderer_host/p2p/socket_host_udp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698