Propagate field trials using Environment with intent to change various types, BasicPortAllocator in particular, to take Environment at construction.
Bug: webrtc:42220378
Change-Id: I488aa82aa606e38f16aa22a032c60f4d191ede72
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/377040
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43887}
This reverts commit 4de5839c1117e5bb96148c8575a74a69bde02768.
Reason for revert: Bug fixed + DCHECK added
Original change's description:
> Revert "Move piggybacking controller from P2PTC to DTLS transport"
>
> This reverts commit 29e639e0a495a537c610182ab9b04aed8cf10426.
>
> Reason for revert: found bug accessing variable after it has been moved.
>
> Original change's description:
> > Move piggybacking controller from P2PTC to DTLS transport
> >
> > The DTLS-STUN piggybacking controller is associated with both the DTLS
> > transport and the ICE transport (P2PTransportChannel). It turned out to
> > be more closely associated with the DTLS transport and requires less
> > plumbing when moved there.
> >
> > The config option to enable the feature remains as part of the ICE
> > transport config since the ICE transport does not know its "upstream"
> > DTLS transport and hence can not query the config from it.
> >
> > BUG=webrtc:367395350
> >
> > Change-Id: Iafd5abd8b65855bcf32bf840414d96513d8e6300
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375283
> > Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> > Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#43823}
>
> Bug: webrtc:367395350
> Change-Id: I2d83de8890b0aa230dd9e21cb5ce2eb03c8d3564
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375861
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43824}
Bug: webrtc:367395350
Change-Id: I4b4acccf15de565736b072ca2de88a1551a6378e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375862
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43825}
This reverts commit 29e639e0a495a537c610182ab9b04aed8cf10426.
Reason for revert: found bug accessing variable after it has been moved.
Original change's description:
> Move piggybacking controller from P2PTC to DTLS transport
>
> The DTLS-STUN piggybacking controller is associated with both the DTLS
> transport and the ICE transport (P2PTransportChannel). It turned out to
> be more closely associated with the DTLS transport and requires less
> plumbing when moved there.
>
> The config option to enable the feature remains as part of the ICE
> transport config since the ICE transport does not know its "upstream"
> DTLS transport and hence can not query the config from it.
>
> BUG=webrtc:367395350
>
> Change-Id: Iafd5abd8b65855bcf32bf840414d96513d8e6300
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375283
> Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43823}
Bug: webrtc:367395350
Change-Id: I2d83de8890b0aa230dd9e21cb5ce2eb03c8d3564
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375861
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43824}
The DTLS-STUN piggybacking controller is associated with both the DTLS
transport and the ICE transport (P2PTransportChannel). It turned out to
be more closely associated with the DTLS transport and requires less
plumbing when moved there.
The config option to enable the feature remains as part of the ICE
transport config since the ICE transport does not know its "upstream"
DTLS transport and hence can not query the config from it.
BUG=webrtc:367395350
Change-Id: Iafd5abd8b65855bcf32bf840414d96513d8e6300
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375283
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43823}
This will cause automation to not pick it up when searching for
headers.
Bug: webrtc:42226155
Change-Id: I4e93cd4eca13af32f76201df784b20a80ac9baed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375581
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43816}
DTLS 1.3 encrypts more parts of the handshake so we move from
deep packet inspection to looking at the state of DTLS to
decide whether to intercept the packet.
BUG=webrtc:367395350
Change-Id: Idb1eda0437f24002f48381af5d6a167a4a153381
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374501
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43794}
This change puts the DTLS handshake as payload of STUN packets with a custom STUN attribute (registered with the IANA) and starts the DTLS handshake before the ICE transport becomes writable. Effectively, STUN acts as a transport layer for DTLS during the handshake phase.
This will theoretically reduce the call setup time by one RTT for aggressive nomination or two RTTs for regular nomination.
The latest DTLS packet (flight) is cached and sent on every STUN request or response. DTLS packets are extracted from every authenticated STUN request or response and handled to the DTLS layer for processing.
The caching also increases the resilience to packet loss as STUN pacing is more aggressive (every 20ms) than the exponential backoff used by DTLS which should reduce call setup time in lossy networks.
If the other side of the connection does not support this feature the fallback to normal DTLS happens as soon as the ICE transport becomes writable. This also handles edge-cases like fragmentation of the DTLS handshake.
The feature is only supported when ECDSA certificates are used since RSA certificates are too large to transport as STUN attributes. The observed attributes for the server and client flights with the certificates were around 600 to 650 bytes. This may be further reduced by using raw public keys defined in RFC 7250.
This feature is disabled by default and guarded by the field trial
WebRTC-IceHandshakeDtls
and requires experimentation and standardization before roll-out in the browser.
Parts of this landed in
https://webrtc-review.googlesource.com/c/src/+/370679
BUG=webrtc:367395350
Change-Id: I4809438b2a267c4690a9b2bd6f1766d2f959500d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362480
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43742}
which implements the handshaking logic of the DTLS-STUN piggybacking.
Not wired up yet, split from
https://webrtc-review.googlesource.com/c/src/+/362480
BUG=webrtc:367395350
Change-Id: I9ee8ff17af4ec96fb891d9852ac50825155735a8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370679
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43606}
- add DTLS1.3 ciphers (without KeyType)
- remove code in dtls_transport.cc that tries to parse DTLS packet
- cleanup some test
- start on test for packet loss during dtls handshake (more to come!)
After this patch is submitted, it is possible
to set max version = dtls1.3 and it will active
but DON'T do it yet.
BUG=webrtc:383141571
Change-Id: I6f9a120c53415ccee7a560ea83bd0c2636702997
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371300
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43595}
removing the last vestiges of the p2p/ dependencies and stop depending
on them for the "webrtc" static library.
BUG=webrtc:42226155
Change-Id: I0b6ac36c0a22054c229a94f55fa6690580b9d47f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371342
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43581}
removing the webrtc need for having sources in it.
BUG=webrtc:42226155
Change-Id: I40fbde9064f4fa629c7c6b0cf99f23ab1726da75
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370820
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43540}
This reverts commit 03f56d75d5a4bbbc6b6fe93e119f73c69ff98267.
Reason for revert: Breaks downstream project.
Original change's description:
> Remove stun_prober
>
> The STUN prober shows the old RFC 3489 way of determining the NAT type
> by pinging two different servers. This is known to be faulty as pointed
> out by
> https://datatracker.ietf.org/doc/html/rfc5389#section-2
>
> Chromium dependency removed in
> https://chromium-review.googlesource.com/c/chromium/src/+/6036622
>
> BUG=None
>
> Change-Id: I2b61dfe2ff899ce71ec9d2253dc836c5908cf8c6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368182
> Commit-Queue: Philipp Hancke <phancke@meta.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43503}
Bug: None
Change-Id: I08d01d4c9d882aca883e1c889aed8bddbca65b91
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370540
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43506}
for (partially) parsing DTLS packets and extracting the msg_seqs
BUG=webrtc:367395350
Change-Id: Ieb0fc121c6dc82118ced5939c1a9ebe2d72e3cb3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370181
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43501}
and misc cleanup
BUG=webrtc:367395350
No-Iwyu: remaining IWYU failure is deep inside gtest which is unrelated to the changes and needs to be investigated separately
Change-Id: I5c2b7a6cc6b15fc5474c55eb98635cb9145b7373
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370180
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43498}
With L4S in WebRTC, only RTP packets are supposed to be send with ECT(1)
Bug: webrtc:42225697
Change-Id: If10bf74a867d3ea04fd1fb931cdc2a6380176270
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/367220
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43343}
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}
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}
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}
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}
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}
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}
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}
Instead of using PacketTransportInternal::SignalReadPacket.
Bug: webrtc:15368
Change-Id: Icdc2d7f85df6db944f0ba0232891e6c5a8986a66
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340440
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41823}
Moved to cc file to fix link issue when linking with dynamic library
(crd).
Bug: webrtc:15368
Change-Id: I51cefcd439fda93d1135fcffa75198ab680e8583
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340302
Reviewed-by: Jonas Oreland <jonaso@google.com>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41801}
Plan is to replace SignalReadPacket with this new method and have clients register as listeners.
rtc::ReceivedPacket is ammended with Descryption information so that receivers can know how to treat a received packet.
This will replace the current "flag". Also see https://webrtc-review.googlesource.com/c/src/+/340301/3
Bug: webrtc:15368
Change-Id: I9ea1f34e8b1e923d67c2e92e36a22b3dd10dbd73
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340181
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41795}
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}
This completes the breakup of the rtc_p2p target.
Remaining cleanup is to delete the rtc_p2p target and make clients
depend on the base targets.
Bug: webrtc:15796
Change-Id: I67bbeee9abf0bb663283ec3420a9a00bd3a2436a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338340
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41683}
This takes the rest of the .cc files out of the rtc_p2p build
target, leaving only one entangled target to clean up.
Bug: webrtc:15796
Change-Id: I4312b70ffe96a8affc1a02456ac466eea05dd44c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338220
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41676}
This CL does:
- Run IWYU on the relevant elements
- Make connection depend on port_interface, not port
- Make port_allocator depend only on port
- Move some constants from port.h into p2p_constants
This allows a dependency graph without ugly groups.
Bug: webrtc:15796
Change-Id: I0ff0e14eacdfe3b230a8d84902a78eb062d6c8af
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336320
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41618}
This CL splits many of the source files in p2p:rtc_p2p into individual
compile targets.
One target - connection_and_port - was left with multiple source files
because it was too tangled to detangle at once.
Bug: webrtc:15796
Change-Id: I607417e5945306ef64335f40a0ae50f0d15dee6f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335881
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41611}
To be submitted after downstream usage has been removed, but no earlier than December 1, 2023.
Bug: webrtc:12598
Change-Id: Id9acbac591c48c0c5883fe8f06cf6a68471b70f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323004
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41290}
StunServer is updated to ensure registring for receiving packet from the socket is happening on the same thread as where the packets are recevied.
Bug: webrtc:15368, webrtc:11943
Change-Id: I94cc3a47278d5489de7f170c8d43015d1551c437
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328120
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41219}
Deprecate old version but keep it for the time being.
Bug: webrtc:15368
Change-Id: Icbd2078a00d877ff948a2441c2027a12c85d4f2e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326104
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41112}