From 9b2d4f5caa091cfeae33126bce00b391bfe2f301 Mon Sep 17 00:00:00 2001 From: Qingsi Wang Date: Tue, 21 Aug 2018 21:29:54 +0000 Subject: [PATCH] Revert "Use also the related address in redundancy detection for candidates from" This reverts commit 625efe6dfe5b5681a2d8d3d5ecaa0c5ac9edd6ee. Reason for revert: Speculative revert, possibly breaking downstream projects Original change's description: > Use also the related address in redundancy detection for candidates from > the any-address/wildcard ports. > > A TURN server can allocate different IPs for different allocation > requests from the same network interface, and a relayed candidate from a > wildcard port is not considered duplicate with another relayed candidate > using the same network interface in the current redundancy detection, if > their mapped addresses (as the "related address" for relayed candidates) > are different. Extra candidates would then be surfaced to the > application unnecessarily. > > Bug: webrtc:9469 > Change-Id: I504fde3b70cd727ef6ad4517072dcf37328a8380 > Reviewed-on: https://webrtc-review.googlesource.com/86181 > Commit-Queue: Qingsi Wang > Reviewed-by: Steve Anton > Reviewed-by: Qingsi Wang > Cr-Commit-Position: refs/heads/master@{#24108} TBR=steveanton@webrtc.org,tommi@webrtc.org,qingsi@google.com,qingsi@webrtc.org # Not skipping CQ checks because original CL landed > 1 day ago. Landing with NOTRY because ios64_sim_ios10_dbg bot is broken. Passing all other bots. NOTRY=True Bug: webrtc:9469 Change-Id: Ica382280be5b4470cb99d8cccadcd87d3e7d37bb Reviewed-on: https://webrtc-review.googlesource.com/95300 Commit-Queue: Qingsi Wang Reviewed-by: Qingsi Wang Cr-Commit-Position: refs/heads/master@{#24371} --- p2p/client/basicportallocator.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/p2p/client/basicportallocator.cc b/p2p/client/basicportallocator.cc index ec9abb73dd..eb14a37758 100644 --- a/p2p/client/basicportallocator.cc +++ b/p2p/client/basicportallocator.cc @@ -1191,11 +1191,6 @@ void BasicPortAllocatorSession:: // socket to this address, so ignore it. if (c.address().port() != DISCARD_PORT) { ips_from_non_any_address_ports.insert(c.address().ipaddr()); - if (port_data.port()->Type() == RELAY_PORT_TYPE) { - // The related address of a relay candidate is the server reflexive - // address obtained from the TURN allocation response. - ips_from_non_any_address_ports.insert(c.related_address().ipaddr()); - } } } } @@ -1209,8 +1204,7 @@ void BasicPortAllocatorSession:: bool port_signalable = false; for (const Candidate& c : port_data->port()->Candidates()) { if (!CandidatePairable(c, port_data->port()) || - ips_from_non_any_address_ports.count(c.address().ipaddr()) || - ips_from_non_any_address_ports.count(c.related_address().ipaddr())) { + ips_from_non_any_address_ports.count(c.address().ipaddr())) { continue; } // Even when a port is bound to the "any" address, it should normally