Chromium Code Reviews

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.
Jump to:
View side-by-side diff with in-line comments
« 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..8ce6b572528ef7b6edd98460cc24e92820ae2e14 100644
--- a/webrtc/p2p/base/turnport.cc
+++ b/webrtc/p2p/base/turnport.cc
@@ -333,15 +333,17 @@ 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.
+ // Further, 2 exceptions exist. 1. 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. 2. issue 4780 when multiple_routes is
+ // disabled, the local ip is bound to any address.
pthatcher1 2015/06/18 21:25:30 I think we could make this comment more clear. M
guoweis_webrtc 2015/06/19 17:37:49 Done.
if (socket->GetLocalAddress().ipaddr() != ip()) {
- if (socket->GetLocalAddress().IsLoopbackIP()) {
+ if (socket->GetLocalAddress().IsLoopbackIP() ||
+ 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 localhost.";
+ << ". Still allowing it.";
pthatcher1 2015/06/18 21:25:31 I think it would be better to have two different l
guoweis_webrtc 2015/06/19 17:37:49 Done.
} 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