Index: webrtc/p2p/base/turnserver.cc |
diff --git a/webrtc/p2p/base/turnserver.cc b/webrtc/p2p/base/turnserver.cc |
index 3e9d66910ac9d7772161c8b85ccbe4814e1c2b31..0b06c44ab0df35c26e15aa0ff0b10db02dd8f21e 100644 |
--- a/webrtc/p2p/base/turnserver.cc |
+++ b/webrtc/p2p/base/turnserver.cc |
@@ -801,7 +801,8 @@ void TurnServerAllocation::OnExternalPacket( |
buf.WriteUInt16(static_cast<uint16_t>(size)); |
buf.WriteBytes(data, size); |
server_->Send(&conn_, buf); |
- } else if (HasPermission(addr.ipaddr())) { |
+ } else if (!server_->enable_permission_checks_ || |
+ HasPermission(addr.ipaddr())) { |
// No channel, but a permission exists. Send as a data indication. |
TurnMessage msg; |
msg.SetType(TURN_DATA_INDICATION); |