919 Commits

Author SHA1 Message Date
Tom Sepez
7085a884aa Avoid string duplication when returning StringBuilder strings
The const-ref result of .str() must be copied into the returned
value, whereas the result of .Release() can be moved.

Bug: webrtc:374845009
Change-Id: I3abc98be30ce9947127c7664f5ffa6846b772ea2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366480
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43288}
2024-10-23 07:54:18 +00:00
Dor Hen
6d58a43413 Comment unused variables in implemented functions 3\n
Bug: webrtc:370878648
Change-Id: I40251cc529cc20fbf2b034fa25798965b91dbd88
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364683
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Dor Hen <dorhen@meta.com>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43278}
2024-10-22 11:58:48 +00:00
Philipp Hancke
03b2c9f6fc Let ZeroOnFreeBuffer do the memcpy for DTLS-SRTP key extraction
and use uint8_t instead of unsigned char. Follow-up from
  https://webrtc-review.googlesource.com/c/src/+/365274

BUG=webrtc:357776213

Change-Id: Ibc97e5cc85316ba69b4133b7f3c42e3afbdd7abd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365540
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43263}
2024-10-18 11:18:21 +00:00
Philipp Hancke
6caca655d8 Reland "Spanify SRTP key export"
This is a reland of commit 65ae3245f9380e46b1d755f3f452ba63ab6cdf8d
with more backward compat which also fixes the off-by-one issue which caused wrong SRTP keys to be extracted.

Original change's description:
> Spanify SRTP key export
>
> and simplify the interface used as this is only used for exporting
> SRTP keys and passing arcane OpenSSL arguments around does not make
> much sense.
>
> BUG=webrtc:357776213
>
> Change-Id: I9e5a94fe368b77975e48b6dd5ab6a2d2575d6382
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364521
> Commit-Queue: Philipp Hancke <phancke@meta.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Florent Castelli <orphis@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43198}

Bug: webrtc:357776213
Change-Id: I5d43dc23f90ef630834fb400751979fcc5e18203
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365180
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43225}
2024-10-11 19:39:28 +00:00
Jeremy Leconte
32590ef877 Revert "Spanify SRTP key export"
This reverts commit 65ae3245f9380e46b1d755f3f452ba63ab6cdf8d.

Reason for revert: breaks downstream compilation

Original change's description:
> Spanify SRTP key export
>
> and simplify the interface used as this is only used for exporting
> SRTP keys and passing arcane OpenSSL arguments around does not make
> much sense.
>
> BUG=webrtc:357776213
>
> Change-Id: I9e5a94fe368b77975e48b6dd5ab6a2d2575d6382
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364521
> Commit-Queue: Philipp Hancke <phancke@meta.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Florent Castelli <orphis@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43198}

Bug: webrtc:357776213
Change-Id: I03ffcda3d6821718f355b243ce78a9c54b4036f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365062
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Owners-Override: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43202}
2024-10-09 08:51:23 +00:00
Philipp Hancke
65ae3245f9 Spanify SRTP key export
and simplify the interface used as this is only used for exporting
SRTP keys and passing arcane OpenSSL arguments around does not make
much sense.

BUG=webrtc:357776213

Change-Id: I9e5a94fe368b77975e48b6dd5ab6a2d2575d6382
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364521
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43198}
2024-10-08 19:05:40 +00:00
Philipp Hancke
4f732f4847 Constify transport stats
BUG=None

Change-Id: I441a46dea97d9a9022b96aaadef1d7348c6f90ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364124
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43148}
2024-10-02 14:41:09 +00:00
Harald Alvestrand
d259a754a8 Remove deprecated variant of StreamInterface::WriteAll
This has been deprecated since November 2022.

Bug: None
Change-Id: Ia547489b1f703d0744ab7ffc096eeadbb937974a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364381
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43140}
2024-10-02 11:57:16 +00:00
Philipp Hancke
1831184330 Unify TLS cipher suite name handling
Move it away from the "proprietary" SSL_CIPHER_get_id and looking up the cipher based on that towards SSL_CIPHER_standard_name.

SSL_CIPHER_get_id and the associated GetSslCipherSuite API is kept around for
  WebRTC.PeerConnection.SslCipherSuite.*
UMA metrics and metrics compability (despite not yielding the IANA ids it promises).

BUG=None

Change-Id: Iaa357e3e31dc90abea688cf6ca10c0b40582ef38
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363202
Reviewed-by: David Benjamin <davidben@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43097}
2024-09-27 21:45:18 +00:00
Florent Castelli
8037fc6ffa Migrate absl::optional to std::optional
Bug: webrtc:342905193
No-Try: True
Change-Id: Icc968be43b8830038ea9a1f5f604307220457807
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361021
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42911}
2024-09-02 12:16:47 +00:00
Per K
b60f0ffbce Dont signal ReadyToSend in RtpTransport::SendPacket
Before this cl, ReadyToSend signaled false if sending a packet failed and transport->GetError() returns ECONN.
ECONN may be reported by the TCP connection (TcpConnection) if the remote closed the connection. TcpConnection will attempt to reconnect and should change the writable state if it fail.
Changing the state in the context of sending packets may cause recursive
calls and seems to cause problems with incorrect states.
It is simpler if RtpTransport::SendPacket ignore these failures and
upper layers treat these lost packets similar to if the packets had been
lost via UDP.
For safety, this change can be reverted by field trial WebRTC-SetReadyToSendFalseIfSendFail/Enabled/.

Bug: webrtc:361124449 b/359989715
Change-Id: I8e7016dfb4301862286215c4512aa8ac03a16685
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360120
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42868}
2024-08-27 14:16:53 +00:00
Per K
6db0db5cfd Ensure TCPPort is notified of sent packets after reconnect
This fix an issue where the socket does not notify the port of sent packets after that the TCPConnection has opened a new socket. TcpConnection will open a new socket if the TCP  connection has been closed.

Bug: webrtc:361124449 b/359989715
Change-Id: Id33c5fc5292ee7d1c2d1cad6c373e2d4355d4fe1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360260
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42865}
2024-08-27 12:29:52 +00:00
Philipp Hancke
b31ade36ff stun/turn: suppress icecandidateerror for incompatible address family
Suppresses the ice candidate error callback when the STUN/TURN server
address family is not compatible with the local candidate address family.

This is similar to not pairing between candidates that have different
incompatible address families as described in
https://datatracker.ietf.org/doc/html/rfc5245#section-5.7.1

The spec actually says to emit the 701 error if *no* host candidate is able to reach the server:
  https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnectioniceerrorevent-errorcode

Also use the same (spec) error code for STUN and TURN, see
https://github.com/webrtc/samples/issues/1215 (error 600 for TURN)
https://github.com/webrtc/samples/issues/1227 (error 701 with AF mismatch)

Drive-by: misc logging fixes

BUG=webrtc:359404135

Change-Id: I99574b7b2b79986a52ab38a7fa58ea1bebab954c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358961
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42830}
2024-08-22 21:33:45 +00:00
Philipp Hancke
2cfedb277a Remove vestiges of GTURN
and update some usage to use the "correct" stun attribute names

BUG=webrtc:42229250

Change-Id: If0c34d1d9b399766d7073661ea2a5515100256a5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359440
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42810}
2024-08-19 16:05:37 +00:00
Sun Shin
303113a620 Enable rtc::Socket::OPT_RECV_ECN socket option
Enable rtc::Socket::OPT_RECV_ECN socket option by field trial
WebRTC-RFC8888CongestionControlFeedback.

Bug: webrtc:15368
Change-Id: I9befbbb59745c0fc9528bf948ad2cfc90efe226b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357920
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42726}
2024-08-06 01:10:42 +00:00
Philipp Hancke
5d6fa7d2fc Split SSLAdapter/SSLStreamAdapter and deprecate SSL(Stream)Adapter::SetMode
since we do not need two adapters with TLS and DTLS modes.
SSLAdapter is the TLS adapter,
SSLStreamAdapter is the DTLS adapter.

BUG=webrtc:353750117

Change-Id: I223917c71c88437339380e1f196dcf3c0e2021c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354940
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42713}
2024-08-01 17:00:02 +00:00
Philipp Hancke
b5ff55adee Reland "Enable TLS Client Hello extension permutation by default"
This is a reland of commit e13945bf0761d34b902ecbd4e1cc6deb1788a2c9
with additional backward compability defaulting to the new value.

Original change's description:
> Enable TLS Client Hello extension permutation by default
>
> similar to the previous change for DTLS. This affects native TURN/TLS
> connections which are already using this in Chromium.
>
> BUG=webrtc:422225803
>
> Change-Id: I605f106371f2dbe23b1ad5f8385e0e01abe7c48f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357903
> Commit-Queue: Philipp Hancke <phancke@meta.com>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42688}

Bug: webrtc:422225803
Change-Id: Ic194e4f763029e65c1a15a6bbaabcfbcd2866eac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358120
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42702}
2024-07-31 06:01:22 +00:00
Mirko Bonadei
dfa7b2b425 Revert "Enable TLS Client Hello extension permutation by default"
This reverts commit e13945bf0761d34b902ecbd4e1cc6deb1788a2c9.

Reason for revert: Breaks downstream project

Original change's description:
> Enable TLS Client Hello extension permutation by default
>
> similar to the previous change for DTLS. This affects native TURN/TLS
> connections which are already using this in Chromium.
>
> BUG=webrtc:422225803
>
> Change-Id: I605f106371f2dbe23b1ad5f8385e0e01abe7c48f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357903
> Commit-Queue: Philipp Hancke <phancke@meta.com>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42688}

Bug: webrtc:422225803
Change-Id: I8020e420e270c0f47cb8e26a210c801e94f8de7d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357883
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42689}
2024-07-30 07:56:29 +00:00
Philipp Hancke
e13945bf07 Enable TLS Client Hello extension permutation by default
similar to the previous change for DTLS. This affects native TURN/TLS
connections which are already using this in Chromium.

BUG=webrtc:422225803

Change-Id: I605f106371f2dbe23b1ad5f8385e0e01abe7c48f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357903
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42688}
2024-07-30 06:01:19 +00:00
Philipp Hancke
121eeedc14 Improve icecandidateerror text when the TURN/TCP connection is not established
This can be tested by trying to connect to a TURN server that does not
listen on a specific TCP port.

BUG=None

Change-Id: I7029112afa4b1b4376220dfc2d613a30090e4f7d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354901
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Markus Handell <handellm@google.com>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42595}
2024-07-05 15:18:33 +00:00
Tommi
55c3600781 Remove <ostream> dependencies
Some dependencies still exist but are a bit more complex to remove.
This CL removes either unused or easily replaced with ToString()
instances of ostream usage. In one case, moving the operator<<
implementation to the one test file that requires it.

Bug: webrtc:8982
Change-Id: Ia5c840b12a42893494af401317a3daf2fe50ba9b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356240
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42582}
2024-07-03 12:27:55 +00:00
Jonas Oreland
a58047d4e9 Add new constructor for TestUDPPort
The new constructor exposes an already existing constructor,
and is used to create a (test) UDPPort
with a socket...so that one does not (really) need a
socket factory.

Bug: b/339018639
Change-Id: Ib591fe6ae61519fe29cdea819192694448b071e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356141
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42571}
2024-07-02 13:20:51 +00:00
Philipp Hancke
3fede875fe Remove rtc_base/helpers.h and crypto_random include in port allocator
after fixing Chromium (and possibly other downstream projects)

BUG=webrtc:339300437

Change-Id: I1637b379ce778e78b4fb73cb44b291c2f66c3606
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353766
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42533}
2024-06-25 16:10:15 +00:00
Mirko Bonadei
05c6e745db Better capture the goal of TurnPortTest.TestChannelBindGetErrorResponse
Using 1 as channel_id doesn't make it clear that the goal was to
provide an invalid channel.

Bug: webrtc:345518625
Change-Id: Ie64f25b9398eafd3d0a9c8bab106e5277adef7df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353984
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42494}
2024-06-17 08:19:07 +00:00
Mirko Bonadei
d38b84ec27 Fix UBsan error in TurnPortTest.TestChannelBindGetErrorResponse.
With the new version of UBsan, this test triggers:
../../p2p/base/turn_port.cc:1728:45: runtime error: left shift of negative value -1 because of:

message->AddAttribute(std::make_unique<StunUInt32Attribute>(
  STUN_ATTR_CHANNEL_NUMBER, channel_id_ << 16));

Bug: b/344601229
Change-Id: I8e730e805eb6bb70f141fc1c178d48a59575b612
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353900
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42444}
2024-06-07 09:42:13 +00:00
Philipp Hancke
4158678b46 Split "helpers" from SSL target to "crypto_random" and rename
since it contains helpers mostly related to cryptographically secure random numbers and strings.

BUG=webrtc:339300437

Change-Id: I10db939534b25dc792ac1600a4721d1b84521880
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352620
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42441}
2024-06-07 06:41:51 +00:00
Manashi Sarkar
6071f044e1 Revert "Make ICE tiebreaker a construction time argument of Port"
This reverts commit 933357ec0e107162d38e84adebd801edac451c69.

Reason for revert: Breaks build.

Original change's description:
> Make ICE tiebreaker a construction time argument of Port
>
> and remove SetIceTieBreaker()
>
> BUG=webrtc:42224914
>
> Change-Id: Ib806decd061fde1b376064ac9f58df1dad8ee976
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352340
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@meta.com>
> Cr-Commit-Position: refs/heads/main@{#42416}

Bug: webrtc:42224914
Change-Id: Ie50f095e697d6eb36cca6239f9e871b7d627d6f9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353141
Commit-Queue: Manashi Sarkar <manashi@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42420}
2024-05-31 09:31:32 +00:00
Philipp Hancke
933357ec0e Make ICE tiebreaker a construction time argument of Port
and remove SetIceTieBreaker()

BUG=webrtc:42224914

Change-Id: Ib806decd061fde1b376064ac9f58df1dad8ee976
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352340
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42416}
2024-05-30 14:41:14 +00:00
Philipp Hancke
9e78e26535 Remove deprecated Port constructor
BUG=webrtc:42224914

Change-Id: Idc1a86d109c0a8d0d2a295d00b0963f226e9374e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352542
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42407}
2024-05-30 05:57:43 +00:00
Philipp Hancke
7b087121b5 Move moving average helper out of ssl target
to the only place where it is used.

BUG=webrtc:339300437

Change-Id: I0d4124b95d19a11578efaf7e8e0a1ff1d39eb59b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351581
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42383}
2024-05-27 12:50:06 +00:00
Harald Alvestrand
3214fbc725 Reland "p2p: reduce visibility of ICE tiebreaker further"
This reverts commit dbbb6cabc3d25faa61864ad1610bcfdd2cbedf23.

Reason for revert: Fixed downstream issues (in p2)

Original change's description:
> Revert "p2p: reduce visibility of ICE tiebreaker further"
>
> This reverts commit b5df2ba10db3cd04febcde8727e782457708f2fa.
>
> Reason for revert: Breaks downstream
>
> Original change's description:
> > p2p: reduce visibility of ICE tiebreaker further
> >
> > since the tie breaker is owned by the allocator now.
> >
> > BUG=webrtc:42224914
> >
> > Change-Id: I76bd5ae714fb2a6df38e014991242f390ae87e6a
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351180
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> > Commit-Queue: Philipp Hancke <phancke@meta.com>
> > Cr-Commit-Position: refs/heads/main@{#42371}
>
> Bug: webrtc:42224914
> Change-Id: Ic9d5ee229738575910bd33dee278f6049be81205
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351680
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Auto-Submit: Björn Terelius <terelius@webrtc.org>
> Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42374}

Bug: webrtc:42224914
Change-Id: Iea2678ef21aba990bc8b95e5275157c0dba5fa77
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351661
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42378}
2024-05-24 20:19:35 +00:00
Björn Terelius
dbbb6cabc3 Revert "p2p: reduce visibility of ICE tiebreaker further"
This reverts commit b5df2ba10db3cd04febcde8727e782457708f2fa.

Reason for revert: Breaks downstream

Original change's description:
> p2p: reduce visibility of ICE tiebreaker further
>
> since the tie breaker is owned by the allocator now.
>
> BUG=webrtc:42224914
>
> Change-Id: I76bd5ae714fb2a6df38e014991242f390ae87e6a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351180
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@meta.com>
> Cr-Commit-Position: refs/heads/main@{#42371}

Bug: webrtc:42224914
Change-Id: Ic9d5ee229738575910bd33dee278f6049be81205
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351680
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Björn Terelius <terelius@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42374}
2024-05-24 12:47:50 +00:00
Florent Castelli
99c519b3fd Mass removal of absl_deps in all BUILD.gn files
Bug: webrtc:341803749
Change-Id: Id73844ba8d63b9f2f2c9391d8d8116ad0864c36d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351540
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42372}
2024-05-23 15:09:46 +00:00
Philipp Hancke
b5df2ba10d p2p: reduce visibility of ICE tiebreaker further
since the tie breaker is owned by the allocator now.

BUG=webrtc:42224914

Change-Id: I76bd5ae714fb2a6df38e014991242f390ae87e6a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351180
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42371}
2024-05-23 15:08:28 +00:00
Philipp Hancke
c7fd5afd45 Split SSL adapters from main ssl build target 1/2
with an intermediate step since Chromium depends on the openssl_stream_adapter.h which will move to the new target.

BUG=webrtc:339300437

Change-Id: Iea163e0a6e3923ce8a741a2e11e9a2a1e3f3e7a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350887
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42362}
2024-05-21 19:11:53 +00:00
Philipp Hancke
833ec4d123 Make Port constructor take a CreatePortArgs argument
Introduces a struct CreatePortArgs that is similar to the existing
CreateRelayPortArgs and contains parameters that will be passed from
the constructors of descendents of the Port class to the Port.

This struct makes it easier to add new arguments to the port
constructor without changing all inheriting classes.

Rebase of https://webrtc-review.googlesource.com/c/src/+/341021

BUG=webrtc:14626

Change-Id: Id8e5c24a36149e1699e2b42c57e52002d27c86c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345860
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42339}
2024-05-17 15:39:47 +00:00
Philipp Hancke
57dbb1e53e Reland "Split digest methods from ssl target into digest target"
This is a reland of commit 47bfe39ecfe45b2f94c616ace97949003d9e87b4

Original change's description:
> Split digest methods from ssl target into digest target
>
> in an attempt to break up the monolithic ssl target.
>
> BUG=None
>
> Change-Id: I38f5b3e2828742d5d918460db1af0a5797d6a5c2
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349764
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@meta.com>
> Cr-Commit-Position: refs/heads/main@{#42249}

Bug: webrtc:339300437
Change-Id: I31bb79bbc6cc55a2634176f95ec67de195974e1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350260
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42304}
2024-05-15 06:40:16 +00:00
Mirko Bonadei
fc57037462 Revert "Split digest methods from ssl target into digest target"
This reverts commit 47bfe39ecfe45b2f94c616ace97949003d9e87b4.

Reason for revert: Breaks downstream project.

Original change's description:
> Split digest methods from ssl target into digest target
>
> in an attempt to break up the monolithic ssl target.
>
> BUG=None
>
> Change-Id: I38f5b3e2828742d5d918460db1af0a5797d6a5c2
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349764
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@meta.com>
> Cr-Commit-Position: refs/heads/main@{#42249}

Bug: None
Change-Id: Ice6f901cd8c2aecf4cf44d3728ec76568b19a7ca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350180
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42255}
2024-05-08 06:42:32 +00:00
Philipp Hancke
47bfe39ecf Split digest methods from ssl target into digest target
in an attempt to break up the monolithic ssl target.

BUG=None

Change-Id: I38f5b3e2828742d5d918460db1af0a5797d6a5c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349764
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42249}
2024-05-07 16:52:48 +00:00
Tommi
7e41c06d25 Deprecate the StreamInterface::SignalEvent sigslot
In its stead, there's now a SetEventCallback() method.

Bug: webrtc:11943
Change-Id: If936d6e1e23e8a584f06feb123ecf2d450ea4145
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319040
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42187}
2024-04-28 21:30:18 +00:00
Harald Alvestrand
4fc23457aa Remove IceTransportInternal::SignalGatheringState
Landing when last remaining usage in Chrome has been removed.

Bug: webrtc:11943
Change-Id: I62817e2cc0b67113126b82424b6f843c77e66f31
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341001
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42157}
2024-04-23 20:10:03 +00:00
Harald Alvestrand
00566ec1d0 Non-inline functions that call CallbackList and are called from Chrome
This avoids problems with the Chrome component build.

Bug: webrtc:11943
Change-Id: I120628ee7829aa0255e60e2f21ac0608374340b1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348723
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42146}
2024-04-23 08:43:17 +00:00
Tommi
d200488646 Introduce StreamInterface::FireEvent for firing stream events
This is a step towards removing StreamInterface::SignalEvent.
Downstream dependency will need to be updated to call FireEvent()
before further changes can land in webrtc.

Bug: webrtc:11943
Change-Id: Ia7d3f1c43fda52b7cf5bfa082aef3f462553cd67
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347884
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42143}
2024-04-23 02:33:12 +00:00
Harald Alvestrand
6f170a05dc Convert P2PtransportChannel.GatheringState to CallbackList
Earlier attempts have shown that this signal is multiply listened to.

Bug: webrtc:11943
Change-Id: I382df9a554925d214872d788c5d7a36f2f7c7b7e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348661
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42139}
2024-04-22 12:29:56 +00:00
Tommi
f54e0133d7 Remove deprecated ProxyInfo code
Bug: none
Change-Id: I82d3ee97927031d974e2ef657312101dd910eff4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347620
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42136}
2024-04-22 08:38:36 +00:00
Harald Alvestrand
c869266b10 Revert "Convert P2PTransportChannel Candidate Pair Change to CallbackList"
This reverts commit dc43cb24bd8ee85d6a8224c5928ceaf90de729b6.

Reason for revert: Converted the wrong signal, should have been GatheringState.

Original change's description:
> Convert P2PTransportChannel Candidate Pair Change to CallbackList
>
> Earlier attempts have shown that this signal is multiply listened to.
>
> Bug: webrtc:11943
> Change-Id: If9130a7f4c70714b5afda5aca0469b66c8e2612f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347981
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42124}

Bug: webrtc:11943
Change-Id: I73d5d815ced8d7aef4df765c9cf54d7637c6769d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348220
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#42129}
2024-04-20 10:36:46 +00:00
Harald Alvestrand
dc43cb24bd Convert P2PTransportChannel Candidate Pair Change to CallbackList
Earlier attempts have shown that this signal is multiply listened to.

Bug: webrtc:11943
Change-Id: If9130a7f4c70714b5afda5aca0469b66c8e2612f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347981
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42124}
2024-04-19 20:30:01 +00:00
Tommi
db6767dd0c Remove more ProxyInfo references.
This removes many references to the unsupported ProxyInfo struct
but leaves temporary implementations for methods while downstream
code gets updated.

Bug: none
Change-Id: Iab4410b362a8296b2e00cf71080010e515f9f4ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344660
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42096}
2024-04-17 11:55:00 +00:00
Philipp Hancke
4f244d0808 turn: log warning for empty realm attribute
While an empty realm attribute is technically allowed, it reduces
the amount of entropy that goes into the turn credentials hash.

This remains technically broken in the implementation as hash_ is
not recomputed when changing the realm from the initial empty string
value to the empty string. Before this change this lead to hash_ not
being set and the allocate request being treated as not having
enough details to authenticate, resulting in an endless loop of packets.

BUG=chromium:329978076

Change-Id: I3d1295f905a9fb58ca5bc6f82466896f79031865
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344820
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Christoffer Dewerin <jansson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41996}
2024-04-04 19:07:38 +00:00
Tommi
d1e577dd80 Mark cricket port type constants as deprecated
...and remove remaining references to them

Bug: webrtc:15846
Change-Id: Ica41c0d3cf7bc8698749a5ddb4b8f90a0c8c1162
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343784
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41968}
2024-03-26 12:28:42 +00:00