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 <qingsi@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
> 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 <qingsi@google.com>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24371}
diff --git a/p2p/client/basicportallocator.cc b/p2p/client/basicportallocator.cc
index ec9abb7..eb14a37 100644
--- a/p2p/client/basicportallocator.cc
+++ b/p2p/client/basicportallocator.cc
@@ -1191,11 +1191,6 @@
// 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 @@
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