OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 | 300 |
301 // For each network, see if we have a sequence that covers it already. If not, | 301 // For each network, see if we have a sequence that covers it already. If not, |
302 // create a new sequence to create the appropriate ports. | 302 // create a new sequence to create the appropriate ports. |
303 void BasicPortAllocatorSession::DoAllocate() { | 303 void BasicPortAllocatorSession::DoAllocate() { |
304 bool done_signal_needed = false; | 304 bool done_signal_needed = false; |
305 std::vector<rtc::Network*> networks; | 305 std::vector<rtc::Network*> networks; |
306 | 306 |
307 // If the network permission state is BLOCKED, we just act as if the flag has | 307 // If the network permission state is BLOCKED, we just act as if the flag has |
308 // been passed in. | 308 // been passed in. |
309 if (allocator_->network_manager()->enumeration_permission() == | 309 if (allocator_->network_manager()->enumeration_permission() == |
310 rtc::NetworkManager::kEnumerationDisallowed) { | 310 rtc::NetworkManager::ENUMERATION_BLOCKED) { |
311 set_flags(flags() | PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION); | 311 set_flags(flags() | PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION); |
312 } | 312 } |
313 | 313 |
314 // If the adapter enumeration is disabled, we'll just bind to any address | 314 // If the adapter enumeration is disabled, we'll just bind to any address |
315 // instead of specific NIC. This is to ensure the same routing for http | 315 // instead of specific NIC. This is to ensure the same routing for http |
316 // traffic by OS is also used here to avoid any local or public IP leakage | 316 // traffic by OS is also used here to avoid any local or public IP leakage |
317 // during stun process. | 317 // during stun process. |
318 if (flags() & PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION) { | 318 if (flags() & PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION) { |
319 allocator_->network_manager()->GetAnyAddressNetworks(&networks); | 319 allocator_->network_manager()->GetAnyAddressNetworks(&networks); |
320 } else { | 320 } else { |
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1133 ServerAddresses servers; | 1133 ServerAddresses servers; |
1134 for (size_t i = 0; i < relays.size(); ++i) { | 1134 for (size_t i = 0; i < relays.size(); ++i) { |
1135 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) { | 1135 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) { |
1136 servers.insert(relays[i].ports.front().address); | 1136 servers.insert(relays[i].ports.front().address); |
1137 } | 1137 } |
1138 } | 1138 } |
1139 return servers; | 1139 return servers; |
1140 } | 1140 } |
1141 | 1141 |
1142 } // namespace cricket | 1142 } // namespace cricket |
OLD | NEW |