This patch enables an IceController to use
Connection::ForgetLearnedState by returning it
in a SwitchResult, that will cause P2PTransportChannel
to call the method.
BUG: webrtc:11463
Change-Id: I098bbbd2fb2961822b165770189ac0c2225d1cb0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176511
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31458}
This patch fixes a minor bug in the implementation of
surface_ice_candidates_on_ice_transport_type_changed. The existing
implementation correctly handles the surfacing, but accidentally also
set the SetNeedsIceRestartFlag, which made _next_ offer contain
a ice restart.
Modified existing testcase to verify this.
Bug: webrtc:8939
Change-Id: If566e3249296467668627e5941495f6036cbd903
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176127
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31363}
This change fixes a problem where the eventual destruction of a
completed resolver sometimes doesn't happen. This is because the
destruction is posted to the network thread, and if it's destroyed
before the closure is executed, the resolver is leaked.
The fix is in three parts:
1. The resolver->Destroy call is performed on closure destruction
to make sure it will always run.
2. The closure is executed with task queue. This because the
RTC_DCHECK on thread:140 fires with the invoker_.
3. It's not possible to guarantee the context Destroy is called on due
to TaskQueue semantics. Therefore SignalThread::Destroy was changed
to accept any calling context and only requiring it's the last
public call to the object.
For unknown reasons, this leak doesn't trigger the leak checker, see
referred bugs for further investigation.
Bug: webrtc:7723, webrtc:11605, chromium:905542
Change-Id: I2681ff1d2416ccbc564974a65ac84781a9ed7aee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176125
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31359}
Adds the missing tcptype to prflx tcp candidates as tcptype is mandatory per
RFC 6544 and if missing the candidate will contain double whitespace like this
... tcptype generation ...
and will get rejected by the internal parser
BUG=webrtc:11423
Change-Id: Id61babd85cf43d56e9e6f9bf30d4cc9e00f00f60
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170442
Reviewed-by: Taylor <deadbeef@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30959}
This patch extends the NetworkRoute struct with more information
about local/remote endpoints. It adds
- adapter type
- adapter id
- relay
(previously it was "only" network_id)
The patch leaves the {local/remote}_network_id fields
around and populated since downstream projects depend
on them. They will be removed once they have migrated.
OWNER: srte@ call/ test/
OWNER: asapersson@ video/
OWNER: hta@ p2p/ pc/ rtc_base/
BUG: webrtc:11434
Change-Id: I9bcec385b40d707db385fef40b2c7a315dd35dd0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170628
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30848}
This patch introduces 2 new field trials that make p2p_transport_channel
to send ping on network switches. The purpose of this is to reduce the
time that the peers disagre on which connection to use.
- send_ping_on_switch_ice_controlling
Send a ping from the ICE_CONTROLLING side when switching connection.
- send_ping_on_nomination_ice_controlled
Send a ping from the ICE_CONTROLLED side when a connection has been
nominated by remote side.
The extra traffic by these PINGS are considered harmless since
network switches does not happen that often.
Bug: webrtc:10273
Change-Id: Id7abe268c79ceb2404c0543849d5666466e58d0c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169550
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30668}
This was an ICE configuration experiment added a couple years ago that did not end up being used.
Bug: webrtc:11316
Change-Id: Iafb7e1c4f7b4598815f045808dbf6e470172f119
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167680
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30395}
Avoid a warning-as-error of MSVC 2019 due to a test ignoring a
[[nodiscard]] return value:
C4834: discarding return value of function with 'nodiscard' attribute
Change-Id: I6b70d85769f311814393412830f48d0d8bfef63d
Bug: webrtc:11275
Change-Id: I6b70d85769f311814393412830f48d0d8bfef63d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/164467
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30226}
Some messages were processed after involved objects were destructed,
a.k.a. 'use after free'.
This CL fixes that by disconnecting signals before fixture destruction,
honoring CreateChannel/DestroyChannel symmetry and following what is
done in similar test cases.
Bug: webrtc:11269
Change-Id: I122aca70a9978b752edc01e5f31583f4425f3624
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165685
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#30214}
This patch introduces a new type of STUN ping,
GOOG_PING_REQUEST/RESPONSE which is similar
to a STUN_BINDING but does not transmit any values.
The Connection class automatically sends these if
no STUN attributes has changed since last call to Connection::Ping()
if the remote peer has signaled that it supports it.
BUG=webrtc:11100
Change-Id: Ib1b590f0b90ca6cb56f2eb07cd62f976e246bc8c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159961
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Taylor <deadbeef@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30062}
This patch moves the SendBindingResponse from Port
to Connection. This is a behavioural NOP, and I don't
understand why it was in Port in the firs place!
Found when working on GOOG_PING.
BUG=webrtc:11100
Change-Id: I0466c5381f08ec4926ca3380e6914f0bc0dfcf63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161081
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29963}
This patch makes Connection::port() protected
and add explicit methods for the use cases instead
- network() - port()->Network()
- generation() - port()->generation()
This is done to easier mock a Connection.
BUG=webrtc:10647
Change-Id: I5b35477ed9f81d57cd871072874262d0a8af2d4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160784
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29929}
this patch is puts frequently used check into a set of Check-functions.
the behavior of p2p_transport_channel_unittest is almost unchanged,
the minor change is that when waiting for connection between specific
addresses it waits and does not assume that a particular set of
local/remote addresses will be selected first.
the patch also changes a few EXPECT_ to ASSERT_ since the
tests are not useful where the first EXPECT fails.
BUG=webrtc:10647
Change-Id: Iddcc3c88114db80576e9ebc500572a00dbafdd84
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159882
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Honghai Zhang <honghaiz@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29812}
The existing ICE stack will choose *the first* connection
that becomes writable.
It is possible that waiting a fixed time will choose a
better connection, avoiding a switch, and making the experience better
in total.
This patch is add two field trials to *explore*
that dimension. I.e the code will be rolled back once
experiments has been performed.
- initial_select_dampening, delays selection by X ms.
- initial_select_dampening_ping_received, delays selection for
candidate that has received ping by X ms.
BUG=webrtc:11054
Change-Id: Ifcdde5183f318815e0f5db5802fbf6b542a95f5b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158410
Reviewed-by: Honghai Zhang <honghaiz@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29623}
To avoid IP leak from the CreatePermission request, local relay
candidates must not be paired with remote mDNS candidates, per Section
3.3.2 in draft-ietf-rtcweb-mdns-ice-candidates-04.
Bug: webrtc:11038
Change-Id: I13aada79c812712b850293c7e17094dc8f77105a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157340
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Honghai Zhang <honghaiz@webrtc.org>
Reviewed-by: Alex Drake <alexdrake@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29546}
This patch adds field trials for limiting no of STUN pings
- max_outstanding_pings
send this count of outstanding pings (pings w/o any response),
after that never send any before a reply is received.
NOTE:
1) This patch redoes https://webrtc.googlesource.com/src.git/+/0d28972d8f0659ab90cef7fd59ca54fb122b71bc
which was put into the StunRequestManager.
But that mechanism is not used for STUN pings.
2) This patch build on field-trial-parser added in https://webrtc-review.googlesource.com/c/src/+/156083
Bug: webrtc:10282
Change-Id: If2f22d2b61a28598a3aa93781c9857145576b7a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156162
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Honghai Zhang <honghaiz@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29467}
This patch adds a feature enabled using webrtc field trial
that remove connections between RELAY and non-RELAY candidates.
Bug: webrtc:11021
Change-Id: I924076277a843bffc1d25f6de14d2165f7012c4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156083
Reviewed-by: Honghai Zhang <honghaiz@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29464}
This patch adds accounting and reporting needed for
newly added RTCTransportStats.selectedCandidatePairChanges,
https://w3c.github.io/webrtc-stats/#dom-rtctransportstats-selectedcandidatepairchanges
a) P2PTransportChannel counts everytime selected_connection_
is modified and reports this counter in the GetStats()-call.
b) RTCStatsCollector puts the counter into the standardized
stats object.
Bug: webrtc:10900
Change-Id: Ibaeca18706b8edcbcb44b0c6f2754854bcb545ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149830
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28987}
Per the latest WebRTC stats spec
(https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatestats)
the address field of a peer-reflexive remote candidate should be concealed
until the same address is learnt via addIceCandidate.
This CL also refactors the sanitization-related code paths.
Bug: chromium:968161
Change-Id: I74c5da78232b2f604689867bda2937b8af827c4f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149381
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28909}
The public API to obtain the selected candidate pair is changed to
GetSelectedCandidatePair in the ICE transport, and the returned pair
has address-sanitized candidates.
Bug: chromium:993878
Change-Id: I44f9d2385a84f9e22447108be2e57ef9e62671eb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149080
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28869}
In order to be able to detect and measure context around candidate pair changes.
Bug: webrtc:10419
Change-Id: Iab0d7e7c80d925d1aa44617fc35975fdc6bbc6b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147340
Commit-Queue: Alex Drake <alexdrake@google.com>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28779}
outgoing checks.
This change adds an experimental feature to allow an ICE agent to embed
the transaction ID of the latest connectivity check received from the
remote peer, as an auxiliary acknowledgement in additional to the check
response, in its own checks. This could facilitate the establishment of
ICE connectivity if the check process has a high RTT.
Bug: None
Change-Id: If3e6327720f13beeb14f103af3b5ffb4f9692998
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142682
Reviewed-by: Honghai Zhang <honghaiz@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28316}
from a field trial to RTCConfiguration.
The test coverage is also expanded for the underlying feature.
Bug: None
Change-Id: Ic9c1362867e4a956c5453be7a9355083b6a442f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138980
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Alex Glaznev <glaznev@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28143}
This patch is a NOP and moves
- class Connection
- class ConnectionInfo
- class ProxyConnection
from port.{h/cc} to a new file called connection.{h/cc}
BUG=webrtc:10647
Change-Id: I89322d3421d272657e24a46b28ab6679fcdc9450
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137509
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28101}
The gathering of host candidates with mDNS names is asynchronous and its
completion can happen after a srflx candidate is gathered by the same
underlying socket. We have a broken check in UDPPort::CreateConnection()
that assumes the gathering of host and srflx candidates is sequential.
This CL also does minor refactoring and clean-up.
Bug: chromium:944577
Change-Id: Ic28136a9515081f40b232a22fcbf4209814ed33a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138043
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Jeroen de Borst <jeroendb@webrtc.org>
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28030}
This is a reland of cd8d1cf68e
Original change's description:
> Surface ICE candidates that match an updated candidate filter.
>
> After this change an ICE agent can surface candidates that do not match
> the previous filter but are allowed by the updated one. The candidate
> filter, as part of the internal implementation in the ICE transport,
> manifests the RTCIceTransportPolicy field in RTCConfiguration.
>
> This new feature would allow an ICE agent to gather new candidates when
> the transport policy changes from e.g. 'relay' to 'all' without an ICE
> restart.
>
> A caveat in the current implementation remains, and a candidate can
> surface multiple times if the transport policy, or the candidate filter
> directly, performs multiple transitions from a value that disallows to
> one that allows the underlying candidate type. For example, if the
> transport policy is updated by 'all' -> 'relay' -> 'all', the same host
> candidate can surface after the second update.
>
>
> Bug: webrtc:8939
> Change-Id: I92c2e07dafab225c702c5de28f47958a0d3270cc
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132282
> Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
> Reviewed-by: Jeroen de Borst <jeroendb@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27674}
Bug: webrtc:8939
Change-Id: I9c32b1ea05028ecd937ab4912779dd958faf734f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133582
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Jeroen de Borst <jeroendb@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27694}
This reverts commit cd8d1cf68e.
Reason for revert: breaks an internal project
Original change's description:
> Surface ICE candidates that match an updated candidate filter.
>
> After this change an ICE agent can surface candidates that do not match
> the previous filter but are allowed by the updated one. The candidate
> filter, as part of the internal implementation in the ICE transport,
> manifests the RTCIceTransportPolicy field in RTCConfiguration.
>
> This new feature would allow an ICE agent to gather new candidates when
> the transport policy changes from e.g. 'relay' to 'all' without an ICE
> restart.
>
> A caveat in the current implementation remains, and a candidate can
> surface multiple times if the transport policy, or the candidate filter
> directly, performs multiple transitions from a value that disallows to
> one that allows the underlying candidate type. For example, if the
> transport policy is updated by 'all' -> 'relay' -> 'all', the same host
> candidate can surface after the second update.
>
>
> Bug: webrtc:8939
> Change-Id: I92c2e07dafab225c702c5de28f47958a0d3270cc
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132282
> Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
> Reviewed-by: Jeroen de Borst <jeroendb@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27674}
TBR=shampson@webrtc.org,qingsi@webrtc.org,jeroendb@webrtc.org,sukhanov@webrtc.org
Change-Id: Idd51a640e55a612b42fe8b69e05dff57a22d021a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8939
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133581
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27677}
After this change an ICE agent can surface candidates that do not match
the previous filter but are allowed by the updated one. The candidate
filter, as part of the internal implementation in the ICE transport,
manifests the RTCIceTransportPolicy field in RTCConfiguration.
This new feature would allow an ICE agent to gather new candidates when
the transport policy changes from e.g. 'relay' to 'all' without an ICE
restart.
A caveat in the current implementation remains, and a candidate can
surface multiple times if the transport policy, or the candidate filter
directly, performs multiple transitions from a value that disallows to
one that allows the underlying candidate type. For example, if the
transport policy is updated by 'all' -> 'relay' -> 'all', the same host
candidate can surface after the second update.
Bug: webrtc:8939
Change-Id: I92c2e07dafab225c702c5de28f47958a0d3270cc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132282
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Jeroen de Borst <jeroendb@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27674}
This is used to avoid thread processing in simulated time
controller. This saves up to 30% execution time in debug builds.
Bug: webrtc:10365
Change-Id: Ie83dfb2468d371e4687d28c776acf7e23eb411d1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133173
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27666}
Semi-automatically created with:
git grep -l " testing::" | xargs sed -i "s/ testing::/ ::testing::/g"
git grep -l "(testing::" | xargs sed -i "s/(testing::/(::testing::/g"
git cl format
After this, two .cc files failed to compile and I have fixed them
manually.
Bug: webrtc:10523
Change-Id: I4741d3bcedc831b6c5fdc04485678617eb4ce031
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132018
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27526}
Currently the IceTransportState goes to connected before the connection
is writable and also goes to checking before any candidate pairs are
being checked. This change fixes these cases.
Bug: webrtc:10352, chromium:933802
Change-Id: I64a67c7f76a94a6be9da413740ddc8762fe966ce
Reviewed-on: https://webrtc-review.googlesource.com/c/124102
Commit-Queue: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26842}
Since end-of-candidates signalling isn't implemented yet, the ice transport shouldn't reach completed. We also shouldn't assume that the transport has failed because gathering is complete without candidates, as we might still get remote candidates.
Bug: chromium:922588
Change-Id: I332f57be494efc775819d80908e9f39610311f82
Reviewed-on: https://webrtc-review.googlesource.com/c/118741
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26365}