Since multiple fixes are bundled behind the WebRTC-IPv6NetworkResolutionFixes
field trial, this allows more flexibility if the launch is found to cause any
issues.
Bug: webrtc:14334, webrtc:14131
Change-Id: I2e73b8984db1f3d292cecab98e29c53cfac1c070
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273903
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Auto-Submit: Sameer Vijaykar <samvi@google.com>
Cr-Commit-Position: refs/heads/main@{#37995}
- If there are more than 5 IPv6 networks, then diversify IPv6 interface types selection.
- Passing field_trial from peer_connection_factory.cc when creating BasicPortAllocator object.
Bug: webrtc:14334
Change-Id: I7d100d944f4e60414e3421f422997bc3f168cc24
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271581
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37924}
This is a reland of commit 02b5f3c9c1
without making SetRemoteFingerprint private (but adding a deprecation warning)
Original change's description:
> dtls: allow dtls role to change during DTLS restart
>
> which is characterized by a change in remote fingerprint and
> causes a new DTLS handshake. This allows renegotiating the
> client/server role as well.
> Spec guidance is provided by
> https://www.rfc-editor.org/rfc/rfc5763#section-6.6
>
> BUG=webrtc:5768
>
> Change-Id: I0e8630c0c5907cc92720762a4320ad21a6190d28
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271680
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#37821}
Bug: webrtc:5768
Change-Id: I8dd674db8b683160013e1b4aa7776775d130978f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272221
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#37838}
This reverts commit 02b5f3c9c1.
Reason for revert: SetRemoteFingerprint called by downstream code.
Original change's description:
> dtls: allow dtls role to change during DTLS restart
>
> which is characterized by a change in remote fingerprint and
> causes a new DTLS handshake. This allows renegotiating the
> client/server role as well.
> Spec guidance is provided by
> https://www.rfc-editor.org/rfc/rfc5763#section-6.6
>
> BUG=webrtc:5768
>
> Change-Id: I0e8630c0c5907cc92720762a4320ad21a6190d28
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271680
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#37821}
Bug: webrtc:5768
Change-Id: I266b7fdc9cc0b6dc9d3fa732fca37407b98e0816
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272220
Owners-Override: Björn Terelius <terelius@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37822}
which is characterized by a change in remote fingerprint and
causes a new DTLS handshake. This allows renegotiating the
client/server role as well.
Spec guidance is provided by
https://www.rfc-editor.org/rfc/rfc5763#section-6.6
BUG=webrtc:5768
Change-Id: I0e8630c0c5907cc92720762a4320ad21a6190d28
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271680
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#37821}
Use TimeDelta type instead of raw ints
Remove usage of rtc::MessageHandler and RTC_FROM_HERE
Reduce usage of sigslots
Simplify storage for Channels and Permissions.
Classes that were previously self deleted are now deleted by their owner
Bug: webrtc:9702, webrtc:11318, webrtc:11943
Change-Id: I32c63c11c16c42ae58a65020b1c20a03b21a5abb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271298
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37808}
This combines the below IPv6 fixes into the field trial
WebRTC-IPv6NetworkResolutionFixes:
1. Prefer global IPv6 address over link local
2. Use address family when resolving STUN hostname
WebRTC-PreferGlobalIPv6ToLinkLocal is currently in Dev but will be
rolled back temporarily.
Bug: webrtc:14334, webrtc:14131
Change-Id: I1fb3f55c4c5f3c5c0b441ece30e72cf393e074d0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271340
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37754}
The current behaviour is to lookup using AF_UNSPEC, which leaves
the decision up to the getaddrinfo implementation, then filter to
resolved addresses matching the network family anyway.
Looking up using the network's family upfront avoids resolving to
an unusable address.
Bug: webrtc:14319, webrtc:14131
Change-Id: I4997452dc26aeb82e5d2890701721e7d477803a8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270625
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37753}
The input SocketAddress for STUN host lookup is constructed with just
the hostname, so the family is AF_UNSPEC. So added an overload with a
target family to distinguish this from the family of the input addr.
Bug: webrtc:14319, webrtc:14131
Change-Id: Ia5ac5aa2e894e0c4dfb4417e3e8a76a6cec3ea71
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270624
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@google.com>
Cr-Commit-Position: refs/heads/main@{#37750}
SendStunBindingRequest can cause a SocketAddress pointed to by the
iterator to be deleted asynchronously before returning, causing `it`
to be invalid when incrementing in the continuation step.
Bug: webrtc:7309, webrtc:14131
Change-Id: I3f7d3d7c12935d9592ef3642679a821c58826df9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270744
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37741}
Also refactored a bit to support IPv6 networks and socket factories with
a mocked DNS resolver.
Bug: webrtc:14319, webrtc:14131
Change-Id: I32ac5beb9a72201bf83aac26aed6a670ed2d4955
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270741
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Cr-Commit-Position: refs/heads/main@{#37737}
Base port already keeps an AlwaysValidPointer to field_trials, so
TURN port's duplicate, private copy is redundant.
Bug: webrtc:14319, webrtc:14131
Change-Id: I94ee78ca5140c0b67826fbb94c35e28f30add943
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270627
Reviewed-by: Jonas Oreland <jonaso@google.com>
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37735}
follow-up from https://webrtc-review.googlesource.com/c/src/+/262810
* replace Time::Millis(0) and TimeDelta::Millis(0) with ::Zero()
* drop unnecessary webrtc namespace from some TimeDeltas
* make TimeDelta do the unit conversion for stats
BUG=webrtc:13756
Change-Id: Ic60625ae0fc7959a47a6be9f5051851feaf76373
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265875
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37664}
instead of using Lock/Unlock attributes, use Assert attribute to annotate code is running on certain task queue or thread.
Such check better matches what is checked, in particular allows to
recheck (and thus better document) currently used task queue
Bug: None
Change-Id: I5bc1c397efbc8342cf7915093b578bb015c85651
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269381
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37619}
The absl::string_view versions can now be made pure virtual due to
downstream client changes. The std::string versions in the base
classes are still needed by downstream users, but will be removed
eventually.
Bug: webrtc:13579
Change-Id: Id757a07380f0518edf407ff5d0644511eb1e53d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265980
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37349}
This CL removes the use of the rtc::Thread::socketserver() method
in one place.
Bug: webrtc:13145
Change-Id: I1a1b2501450788263d5280c43e4328ade46f4146
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263320
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#37340}
This CL removes the last "nogncheck" comment that was related to a
known build cycle. The remaining ones are because of conditional
dependencies.
Bug: webrtc:8733
Change-Id: Ie6862ae1cc613b9c2740a34c3167e1741ed31ee3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265981
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37302}
This is the first step of migrating CreateSessionInternal() to
absl::string_view. The std::string version will be removed once all
downstream users have migrated and have implemented the
absl::string_view version.
Bug: webrtc:13579
Change-Id: Ia8bb25c010de118b194e66fd992b910509b9857f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265808
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37227}
This removes MessageHandler and Thread dependencies from StunRequest
and StunRequestManager. Instead the TaskQueueBase abstraction is
used for async posting and synchronous Clear() operations removed by
using a pending task safety flag.
Bug: webrtc:9702
Change-Id: I6e9ed5e1b4c446fd1f91af06e3ab36bccb5d7320
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265060
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37218}
This is the first step of migrating SupportsProtocol() to
absl::string_view. The std::string version will be removed once all
downstream users have migrated and have implemented the
absl::string_view version.
Bug: webrtc:13579
Change-Id: Ib609b9bab0c2e525553daddb1e365050bbe1c1f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265806
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37211}
This reverts commit 869c87a2b9.
Reason for revert: Re-landing
Original change's description:
> Revert "Make deletion of Connection objects more deterministic."
>
> This reverts commit 942cac2e9e.
>
> Reason for revert: Reverting while downstream updates are made.
>
> Original change's description:
> > Make deletion of Connection objects more deterministic.
> >
> > This changes most deletion paths of Connection objects to go through
> > the owner class of the Connection instances, Port.
> >
> > In situations where Connection objects still need to be deleted
> > asynchronously, `async = true` can be passed to
> > `Port::DestroyConnection` and get the same behavior as
> > `Connection::Destroy` formerly gave.
> >
> > The `Destroy()` method still exists for downstream compatibility, but
> > instead of deleting connection objects asynchronously, the deletion
> > now happens synchronously via the Port class.
> >
> > Bug: webrtc:13892, webrtc:13865
> > Change-Id: I07edb7bb5e5d93b33542581b4b09def548de9e12
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259826
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#36676}
>
> Bug: webrtc:13892, webrtc:13865
> Change-Id: I37a15692c8201716402ba5c10f249e4d3754ce4c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260862
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36736}
Bug: webrtc:13892, webrtc:13865
Change-Id: I29da6c8899d8550c26ccecbbd0fe5f5556c80212
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260943
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37171}
Removes all remaining usage of SetType and marks the method as
deprecated.
Bug: none
Change-Id: I98dc613978ffe7ad8a4ffd951dd974d56ed92983
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265100
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37137}
Construction in StunRequest and derived classes now happens in
the ctor.
Bug: none
Change-Id: I803f6fd2b6d0ac1d9426304d1e1de10dec855eed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264942
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37126}
This moves the construction of StunMessage instances for
ConnectionRequest, outside of the Prepare() method.
Following this, removing Construct()+Prepare() is relatively
straight forward.
Bug: none
Change-Id: Ibcf0510cef30a6e648005b43602c7ae1fb06729e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264558
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37122}
This change removes the following after internal cleanup:
- IceRecheckEvent::Type enum, replaced with IceSwitchReason
- IceControllerEvent alias for IceRecheckEvent
Bug: webrtc:14125, webrtc:14131
Change-Id: I07bfeb7fa8a9c4d4a3f940213befd6418dfd6644
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264145
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Cr-Commit-Position: refs/heads/main@{#37118}
This changes renames the event to better suit its purpose. An alias
with the old name is added for compatibility pending internal cleanup.
Bug: webrtc:14125, webrtc:14131
Change-Id: I87026e19f2620eaa6a6770dcbedf1d0399c6c6b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264149
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Cr-Commit-Position: refs/heads/main@{#37111}
This is a partial reland of commit 794e68cf3d
which uses the new enum in P2PTransportChannel and BasicIceController.
Original change's description:
> Refactor IceControllerEvent
>
> This change is the first step in decoupling IceControllerEvent from
> the ICE switch reason. Further cleanup is earmarked, and will be
> landed after some internal cleanup.
>
> This change
> - adds a new enum - IceSwitchReason
> - adds a member for the new enum in IceControllerEvent
> - uses the new enum within P2PTransportChannel
> - adds methods to IceControllerInterface accepting the new enum
> - deprecates usages of the old enum in IceControllerInterface
> - adds conversion between the old and new enums for compatibility
>
> Bug: webrtc:14125, webrtc:14131
> Change-Id: I5b7201c3f631eb40db334dfeec842841a7e58174
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264140
> Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> Commit-Queue: Sameer Vijaykar <samvi@google.com>
> Cr-Commit-Position: refs/heads/main@{#37051}
Bug: webrtc:14125, webrtc:14131
Change-Id: I81b0338ae2f0560cd3df7ad9bd9af37e7c3499df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264554
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Cr-Commit-Position: refs/heads/main@{#37105}
This is a partial reland of commit 794e68cf3d
which
- adds a new enum - IceSwitchReason
- adds a member for the new enum in IceControllerEvent
- adds methods to IceControllerInterface accepting the new enum
- adds conversion between the old and new enums for compatibility
Original change's description:
> Refactor IceControllerEvent
>
> This change is the first step in decoupling IceControllerEvent from
> the ICE switch reason. Further cleanup is earmarked, and will be
> landed after some internal cleanup.
>
> This change
> - adds a new enum - IceSwitchReason
> - adds a member for the new enum in IceControllerEvent
> - uses the new enum within P2PTransportChannel
> - adds methods to IceControllerInterface accepting the new enum
> - deprecates usages of the old enum in IceControllerInterface
> - adds conversion between the old and new enums for compatibility
>
> Bug: webrtc:14125, webrtc:14131
> Change-Id: I5b7201c3f631eb40db334dfeec842841a7e58174
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264140
> Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> Commit-Queue: Sameer Vijaykar <samvi@google.com>
> Cr-Commit-Position: refs/heads/main@{#37051}
Bug: webrtc:14125, webrtc:14131
Change-Id: I2ccdd53c80e38dc139669aa3f438864befed3dc0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264506
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37094}
* Add ctors for providing the type and transaction id at construction.
* Update tests to use them instead of SetType+SetTransactionID
* Make sure stun message enum types are based on uint16_t
* Mark SetTransactionID as deprecated.
* Mark SetStunMagicCookie as deprecated (unused in webrtc).
* Add SetTransactionIdForTest for the one test that uses it (might not
actually need it)
* Make StunRequest::Construct() protected.
* Add a TODO to follow up on this since construction of StunRequest
goes through an unnecessarily complex 3-step process involving
other classes and a virtual method.
Bug: none
Change-Id: Ib013e58f28e7b2b4fcb3b3e1034da31dfc93e9d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264546
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37079}
This reverts commit 794e68cf3d.
Reason for revert: Possibly breaks downstream project
Original change's description:
> Refactor IceControllerEvent
>
> This change is the first step in decoupling IceControllerEvent from the
> ICE switch reason. Further cleanup is earmarked, and will be landed
> after some internal cleanup.
>
> This change
> - adds a new enum - IceSwitchReason
> - adds a member for the new enum in IceControllerEvent
> - uses the new enum within P2PTransportChannel
> - adds methods to IceControllerInterface accepting the new enum
> - deprecates usages of the old enum in IceControllerInterface
> - adds conversion between the old and new enums for compatibility
>
> Bug: webrtc:14125, webrtc:14131
> Change-Id: I5b7201c3f631eb40db334dfeec842841a7e58174
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264140
> Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> Commit-Queue: Sameer Vijaykar <samvi@google.com>
> Cr-Commit-Position: refs/heads/main@{#37051}
Bug: webrtc:14125, webrtc:14131
Change-Id: Ie6c4dea0f9007f78ce2bf1ee4e6b1dbca08f3142
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264505
Auto-Submit: Sameer Vijaykar <samvi@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37059}