This reverts commit d99499abba.
Reason for revert: Breaks downstream projects and I can also repro locally when running the rtc_unittest test target (it does however pass in isolation indicating test cleanup/setup needs to be fixed)
Original change's description:
> p2p: separate ICE tie breaker and foundation seed
>
> BUG=webrtc:14626
>
> Change-Id: I189a708192c9cef0b50c3fcbe798b30376d3b547
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338982
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41806}
Bug: webrtc:14626
Change-Id: If45f8a33395c562c9388b3d3748e8566efa87ecb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341081
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Christoffer Dewerin <jansson@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Owners-Override: Christoffer Dewerin <jansson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41812}
Move code from P2PTransportChannel to Candidate, where we set the
foundation value for remote prflx candidates.
Bug: none
Change-Id: I7dbcb85bca35dca7297136b0706092dd8d2b153c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339902
Reviewed-by: Philipp Hancke <phancke@microsoft.com>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41774}
Switch to type_name() for things like logging since `type()` will
change to returning an enumeration value.
The functional change that this has is that log statements and
Connection::ToString() (used for logging) will contain "host"
instead of "local" and "srflx" instead of "stun".
Bug: webrtc:15846
Change-Id: I35c50d026e4578a25d51765d59c6f2e01b850c94
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339180
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41757}
Candidate::type() is currently how the name of the type is fetched,
but that getter returns a non-standard type name.
Instead, I'm adding a new getter, type_name(), will follow up with
updating dependent code that needs the string, to use type_name (and
adapt to potential dependency on "local" or "stun") and then switch
type() to be enum based.
Also adding a test file for Candidate with a couple of basic tests to
start with.
Bug: webrtc:15846
Change-Id: I9b78b2405a9f962a3c07eaa8e72a79854c6f5ceb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339660
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41740}
Add is_* getters to check candidate type without using the string constants directly.
Bug: none
Change-Id: I82c83c032a30a1c67de2d5d6168ecc04e0254318
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334800
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41568}
since this may contain sensitive data, just like the address.
BUG=None
Change-Id: I3faa1512a15467cd5cc4bcbcaebadb736f1bae07
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/313040
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40473}
Introduces a field trial
WebRTC-IncreaseIceCandidatePriorityHostSrflx
that adjusts the priority of non-relay candidates such that the STUN priority attribute calculated as
(prflx-type-preference << 24) | (priority & 0x00FFFFFF)
as described in
https://www.rfc-editor.org/rfc/rfc5245#section-7.1.2.1
will satisfy the condition that the STUN priority of server-reflexive candidates will always be higher than the STUN priority of relay candidates.
Previously this was not the case because the TURN relay preference was added to the local_preference for relay candidates, making it higher than the local_preference of srflx candidates gathered from the same interface.
This led to cases where the resulting candidate pair priority of a srflx-relay pair was higher than the candidate pair priority of a srflx-srflx pair, i.e. using a TURN server in cases that work using a direct P2P connection.
Whether the field trial is active can be observed by checking that
priority-of-srflx-candidate&0x00FFFFFF
is greater than
priority-of-relay-candidate&0x00FFFFFF
BUG=webrtc:13195,webrtc:5813,webrtc:15020
Change-Id: Ib91708fbe7310b6454f93158a45c9d77da009091
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292700
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40311}
Typically, remote candidates come from signalling and are deserialized
into C++ objects. The network_type field of these candidates is
always ADAPTER_TYPE_UNKNOWN.
However, in tests it is common to pass SDP and remote candidates as C++
objects. In this case, the network_type property of remote candidates
is preserved, so DCHECK might be triggered when GetStats is called.
Clearing fields that are not suitable as remote candidates fixes
this issue.
Bug: None
Change-Id: Ida01b0224bce5cf3e87bcad1ddaca35c9f4fffe7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279680
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Auto-Submit: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38436}
Also applies sanitizing to prflx candidates, not just local ones.
Also add tests for the port allocator Sanitize function.
Bug: chromium:1218346
Change-Id: Ifbc7843cd6e289c09ca72b6ec610a34bbbf7e04e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222581
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34292}
The address and the related address of local candidates are sanitized
accordingly when the mDNS concealment of local IPs is enabled. Also,
remote hostname candidates created from signaling are sanitized in stats
as well. A couple of unit tests are revised to reflect the desired
behavior of AsyncResolverInterface so that when a hostname candidate is
resolved, the hostname is kept in the candidate address.
Bug: webrtc:9605, chromium:914452
Change-Id: Iad9ad04ce4e50304e44cf04b15b97a7ae2dec960
Reviewed-on: https://webrtc-review.googlesource.com/c/113643
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
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@{#25996}
This CL is the result of running include-what-you-use tool on part
of the code base (audio target and dependencies) plus manual fixes.
bug: webrtc:8311
Change-Id: I277d281ce943c3ecc1bd45fd8d83055931743604
Reviewed-on: https://webrtc-review.googlesource.com/c/106280
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25311}
Replace calls to .str() which copies with .Release which moves in cases where that's safe.
This CL was generated by this command:
git grep -l 'StringBuilder' |
xargs perl -i -0 -pe "s/(rtc::StringBuilder (\S+);.*?return )\\g2.str\(\)/\$1\$2.Release\(\)/sg"
Bug: webrtc:8982
Change-Id: If4dadbeb039df010aaaa9e58da81c1971a84fe8f
Reviewed-on: https://webrtc-review.googlesource.com/100307
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24790}
This CL replaces std::o?stringstream with rtc::StringBuilder where that's possible to do without changing any of the surrounding code. It also updates includes and build files as appropriate.
The CL was generated by running 'git grep -l -P std::o?stringstream | xargs perl -pi -e "s/std::o?stringstream/rtc::StringBuilder/g"'. Then I've manually updated the #includes and BUILD files, run 'git cl format' and unstaged any file that would need more complex fixes.
Bug: webrtc:8982
Change-Id: Ibc32153f4a3fd177e260b6ad05ce393972549357
Reviewed-on: https://webrtc-review.googlesource.com/98460
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24605}
This prepares us for removing them altogether.
Bug: webrtc:8982
Change-Id: I66002cc8d4bf0e07925766d568d2498422f0f38e
Reviewed-on: https://webrtc-review.googlesource.com/64142
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Henrik Grunell <henrikg@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22707}