Following [1], add many more checks for safe access to member variables.
This change is effectively a no-op, but landed separately from the
earlier change that's smaller but contains a fundamental assumption
gleaned from the implementation (and its use).
[1]: https://webrtc-review.googlesource.com/c/src/+/249942
Bug: webrtc:11988
Change-Id: I1568e2160c9faa6993c5b68044312f83d00e4815
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249943
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35850}
Make sure that instances are always created+deleted on the
network thread.
Bug: webrtc:11988
Change-Id: I4fb5dd5bd14768d89ca78b348988a797fcdd130a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249942
Reviewed-by: Niels Moller <nisse@webrtc.org>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35842}
Add implementation of RTC_DCHECK_NOTREACHED equal to the RTC_NOTREACHED.
The new macros will replace the old one when old one's usage will be
removed. The idea of the renaming to provide a clear signal that this
is debug build only macros and will be stripped in the production build.
Bug: webrtc:9065
Change-Id: I4c35d8b03e74a4b3fd1ae75dba2f9c05643101db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237802
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35348}
GICE was removed around M42
BUG=webrtc:4299
Change-Id: I4e83a888c3ecc1681799c07b47b75c9f31b40baa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227348
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34680}
The new verification makes verification a function on a message.
It also stores the password used in the request message, so that
it is easily accessible when verifying the response.
Bug: chromium:1177125
Change-Id: I505df4b54214643a28a6b292c4e2262b9d97b097
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/209060
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33366}
Add a timestamp for last data sent in Connection.
Move calling of rtc::TimeMillis() to Connection and remove it from RateTracker::AddSamples.
This timestamp will be used to further improve fail over logic.
BUG=None
Change-Id: I4cbc7693a0e081277590b9cb13264dc2a998202e
No-Try: True
Change-Id: I4cbc7693a0e081277590b9cb13264dc2a998202e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/197421
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32831}
A connection is currently deleted if it has not recevied anything for
30s. This patch adds a field trial that allows modifying this value
if no pings are outstanding.
The motivation for this is to experiment with pinging slower than
once per 30s in order to save battery.
Bug: webrtc:10282
Change-Id: I3272b9d68d44fc30379bd9a6c643db6b09766486
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175005
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31239}
This patch adds new enum values for different types of cellular
connections.
The new costs are currently blocked when sending to remote,
(so that arbitrary network switches does not starts occurring).
The end-game for this series to be able to distinguish between
different type of cellular connections in the ice-layer (e.g when
selecting/switching connections).
BUG: webrtc:11473
Change-Id: I587ac8fdff4f6cdd0f8905f327232f58818db4f6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172582
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30970}
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 adds a new ForgetLearnedState() method on a Connection.
The method, puts the connection into a state similar to
when it was just created.
- write_state = STATE_WRITE_INIT
- receving = false
- throw away all pending request
- reset RttEstimate
All other state is kept unchanged.
Note: It does not trigger SignalStateChange
A subsequent patch will expose the method to the IceController.
BUG: webrtc:11463
Change-Id: I055e8cd067e1bc4fd5ad64dd10f458554dbc87e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171805
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30916}
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}
This patch improves handshake wrt GOOG_PING support so that
- if goog_ping_enable: sender send it's goog-ping version until it gets
STUN_BINDING_RESPONSE
- receiver only sends it's goog-ping-version if getting a
goog-ping-version in the request
This means that the overhead of STUN_ATTR_GOOG_MISC_INFO is only
- added on STUN_BINDING_REQUEST until a response is received.
- added on STUN_BINDING_RESPONSE if remote peer request it.
This is wire compatible with older versions so that
- new sender will enable GOOG_PING with new/old receiver.
- old sender will enable GOOG_PING with old receiver.
- old version will not enable GOOG_PING with new receiver
(receiver expecting sender to announce first).
BUG: webrtc:11100
Change-Id: Ib3434c593988188150f4c7506918139aaf138d0c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165787
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30269}
This CL was generated by running:
git ls-files | grep ".cc" | xargs perl -i -ne 'BEGIN {undef $/}; s/("[\s\n]*<<[\s\n]*")/" "/g; print;'; git cl format
After that I manually edited modules/audio_processing/gain_controller2.cc to preserve its original
formatting.
This primary benefit of this change is a small reduction in binary size.
Bug: None
Change-Id: I689fa7ba9c717c314bb167e5d592c3c4e0871e29
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165961
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30251}
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 estimates the connection RTT using
EventBasedExponentialMovingAverage. The half time is
set to 500 but can be modified using field trials.
This new metric is currently unused, but will
be used for exploration of of whether it can be used
instead of the existing metric.
Bug: webrtc:11140
Change-Id: I9db93e9b9eb932e3cd18935cd4ce0d90fc1cb293
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161000
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29944}
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 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}
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}
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}
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}