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

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

Issue 1196453005: Issue 4780: disabling multiple_routes breaks Turn/Tcp. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/turnport.cc
diff --git a/webrtc/p2p/base/turnport.cc b/webrtc/p2p/base/turnport.cc
index 58fb01a4e81c9d14632a51e5f438e672c6c1c784..27f88dc7b8fb61e6380c4ca6465c0773f2a1a336 100644
--- a/webrtc/p2p/base/turnport.cc
+++ b/webrtc/p2p/base/turnport.cc
@@ -333,15 +333,23 @@ void TurnPort::OnSocketConnect(rtc::AsyncPacketSocket* socket) {
// given a binding address, and the platform is expected to pick the
// correct local address.
- // Further, to workaround issue 3927 in which a proxy is forcing TCP bound to
- // localhost only, we're allowing Loopback IP even if it's not the same as the
- // local Turn port.
+ // However, there are two situations in which we allow the bound address to
+ // differ from the requested address: 1. The bound address is the loopback
+ // address. This happens when a proxy forces TCP to bind to only the
+ // localhost address (see issue 3927). 2. The bound address is the "any
+ // address". This happens when multiple_routes is disabled (see issue 4780).
if (socket->GetLocalAddress().ipaddr() != ip()) {
if (socket->GetLocalAddress().IsLoopbackIP()) {
LOG(LS_WARNING) << "Socket is bound to a different address:"
<< socket->GetLocalAddress().ipaddr().ToString()
<< ", rather then the local port:" << ip().ToString()
<< ". Still allowing it since it's localhost.";
+ } else if (IPIsAny(ip())) {
+ LOG(LS_WARNING) << "Socket is bound to a different address:"
+ << socket->GetLocalAddress().ipaddr().ToString()
+ << ", rather then the local port:" << ip().ToString()
+ << ". Still allowing it since it's any address"
+ << ", possibly caused by multiple_routes being disabled.";
} else {
LOG(LS_WARNING) << "Socket is bound to a different address:"
<< socket->GetLocalAddress().ipaddr().ToString()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698