We now use RTC_HISTOGRAM_* macros in system_wrappers/include/metrics.h
to report the metrics in pc/ and p2p/ that are currently been reported
using MetricsObserverInterface.
TBR=tommi@webrtc.org
Bug: webrtc:9409
Change-Id: I47c9975402293c72250203fa1ec19eb1668766f6
Reviewed-on: https://webrtc-review.googlesource.com/83782
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Taylor (left Google) <deadbeef@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23914}
When a TCP TURN port is destroyed, a TURN refresh request with zero
lifetime is first sent to release the TURN allocation at the server,
and the underlying TCP connection is closed afterwards.
The closing of the TCP connection is handled first by the
VirtualSocketServer in our test infrastructure, and the corresponding
server socket is asynchronously destroyed at the TURN server. The
refresh request is however still passed to this server socket and
further signaled to the TURN server, which fails a DCHECK. The
server implementation should disable any firing of signals from a
server socket to be destroyed.
The bug id is set to None since this is a one-liner CL.
TBR=pthatcher@webrtc.org
Bug: None
Change-Id: Ib457b3800511a322ef69d67c71f2de05f3d67967
Reviewed-on: https://webrtc-review.googlesource.com/86501
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@google.com>
Cr-Commit-Position: refs/heads/master@{#23809}
We now always enable any address ports, only using them if they end up
using interfaces that weren't otherwise accessible. This flag is no
longer used by downstream projects.
TBR=deadbeef@webrtc.org
Bug: None
Change-Id: I6e4e93958cbc4300811bafb103f1a2e8732274ed
Reviewed-on: https://webrtc-review.googlesource.com/85860
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23751}
This reverts commit 056a68da896d9a578b9ea83e56d261648ea0adc6.
Reason for revert: Trying to reland.
Original change's description:
> Revert "Enable any address ports by default."
>
> This reverts commit f04148c810aad2a0809dc8978650c55308381c47.
>
> Reason for revert: Speculative revert. I suspect this is breaking a
> downstream test (I'll reland if it is not the culprit).
>
> Original change's description:
> > Enable any address ports by default.
> >
> > Ports not bound to any specific network interface are allocated by
> > default. These any address ports are pruned after allocation,
> > conditional on the allocation results of normal ports that are bound to
> > the enumerated interfaces.
> >
> > Bug: webrtc:9313
> > Change-Id: I3ce12eeab0cf3547224e5f8c188d061fc530e145
> > Reviewed-on: https://webrtc-review.googlesource.com/78383
> > Commit-Queue: Qingsi Wang <qingsi@google.com>
> > Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#23673}
>
> TBR=deadbeef@webrtc.org,pthatcher@webrtc.org,qingsi@google.com
>
> Change-Id: I3b3dc42c7de46d198d4b9c270020dcf1100dd907
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9313
> Reviewed-on: https://webrtc-review.googlesource.com/84300
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23678}
TBR=deadbeef@webrtc.org,mbonadei@webrtc.org,pthatcher@webrtc.org,qingsi@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:9313
Change-Id: I98442346babb5d8953d37dc5825efaf79804ed7f
Reviewed-on: https://webrtc-review.googlesource.com/85000
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23720}
This is a no-op change because rtc::Optional is an alias to absl::optional
This CL generated by running script with parameter 'rtc_base'
Then manually fix where Optional was used without rtc prefix (patchset#3)
find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+
find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"[\./api]*:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;
git cl format
Bug: webrtc:9078
Change-Id: I825f80cc8089747876ba6316d9e7c30e05716974
Reviewed-on: https://webrtc-review.googlesource.com/84585
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23700}
Messages posted to the main thread are handled by dangling pointers to
destroyed endpoints after the tests end.
Bug: None
Change-Id: I901d63bf11574882d0259cd4b07e628f6a4eebc5
Reviewed-on: https://webrtc-review.googlesource.com/84540
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@google.com>
Cr-Commit-Position: refs/heads/master@{#23691}
This reverts commit f04148c810aad2a0809dc8978650c55308381c47.
Reason for revert: Speculative revert. I suspect this is breaking a
downstream test (I'll reland if it is not the culprit).
Original change's description:
> Enable any address ports by default.
>
> Ports not bound to any specific network interface are allocated by
> default. These any address ports are pruned after allocation,
> conditional on the allocation results of normal ports that are bound to
> the enumerated interfaces.
>
> Bug: webrtc:9313
> Change-Id: I3ce12eeab0cf3547224e5f8c188d061fc530e145
> Reviewed-on: https://webrtc-review.googlesource.com/78383
> Commit-Queue: Qingsi Wang <qingsi@google.com>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23673}
TBR=deadbeef@webrtc.org,pthatcher@webrtc.org,qingsi@google.com
Change-Id: I3b3dc42c7de46d198d4b9c270020dcf1100dd907
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9313
Reviewed-on: https://webrtc-review.googlesource.com/84300
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23678}
Ports not bound to any specific network interface are allocated by
default. These any address ports are pruned after allocation,
conditional on the allocation results of normal ports that are bound to
the enumerated interfaces.
Bug: webrtc:9313
Change-Id: I3ce12eeab0cf3547224e5f8c188d061fc530e145
Reviewed-on: https://webrtc-review.googlesource.com/78383
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23673}
Running clang-format with chromium's style guide.
The goal is n-fold:
* providing consistency and readability (that's what code guidelines are for)
* preventing noise with presubmit checks and git cl format
* building on the previous point: making it easier to automatically fix format issues
* you name it
Please consider using git-hyper-blame to ignore this commit.
Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
Extract rtc_base/base64.h and rtc_base/base64.cc into separate target
to prepare to move them into third_party
Bug: webrtc:8366
Change-Id: I477e6da2b9d09307439b3272261f31042f479d74
Reviewed-on: https://webrtc-review.googlesource.com/83980
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23645}
This is a no-op change because rtc::Optional is an alias to absl::optional
This CL generated by running script with parameters 'media ortc p2p':
find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+
find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"(../)*api:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;
git cl format
Bug: webrtc:9078
Change-Id: I19167714af7cc1436d34cfcba6c8b3718d8e677b
Reviewed-on: https://webrtc-review.googlesource.com/83731
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23638}
This is a reland of 14f8aba9967ac2f1789ede12ff66107962757fb5
Original change's description:
> Refactor the regathering of candidates in P2PTransportChannel.
>
> The functionality of regathering candidates is refactored to a separate
> regathering controller owned by P2PTransportChannel. This refactoring
> is part of a long-term plan to restructure a modularied
> P2PTransportChannel and it would also benefit the addition of autonomous
> regathering of candidates that is proactive to the ICE states in the
> near future.
>
> Bug: None
> Change-Id: I74cea974ea628430c77b5d51b7c9179ddffc690d
> Reviewed-on: https://webrtc-review.googlesource.com/75820
> Commit-Queue: Qingsi Wang <qingsi@google.com>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23588}
Bug: None
Change-Id: I7308e2aef692edd4f0bf9717a88ba2dfba4383a6
Reviewed-on: https://webrtc-review.googlesource.com/83360
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23607}
If the socket server of the thread where FakePortAllocator lives is not
configured to be a VirtualSocketServer, there is a chance that we have a
null port in FakePortAllocator::StartGettingPort after creating the test
UDP port (for example, no permission to create a real socket if using a
PhysicalSocketServer), and subsequently this results in a crash when
connecting a signal in the port to a slot.
Bug: webrtc:9406
Change-Id: I1ba4526f7b9e104bed556f61d9348edc426fc1fc
Reviewed-on: https://webrtc-review.googlesource.com/83480
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@google.com>
Cr-Commit-Position: refs/heads/master@{#23606}
This reverts commit 14f8aba9967ac2f1789ede12ff66107962757fb5.
Reason for revert: breaking internal tests
Original change's description:
> Refactor the regathering of candidates in P2PTransportChannel.
>
> The functionality of regathering candidates is refactored to a separate
> regathering controller owned by P2PTransportChannel. This refactoring
> is part of a long-term plan to restructure a modularied
> P2PTransportChannel and it would also benefit the addition of autonomous
> regathering of candidates that is proactive to the ICE states in the
> near future.
>
> Bug: None
> Change-Id: I74cea974ea628430c77b5d51b7c9179ddffc690d
> Reviewed-on: https://webrtc-review.googlesource.com/75820
> Commit-Queue: Qingsi Wang <qingsi@google.com>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23588}
TBR=deadbeef@webrtc.org,pthatcher@webrtc.org,qingsi@google.com
Change-Id: I8b08351c9a3fcf89e2a25ed2c668c335cbd2d2d0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/83300
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@google.com>
Cr-Commit-Position: refs/heads/master@{#23592}
The PeerConnection integration test was creating TurnServers on the
stack on the signaling thread. This could cause a race condition problem
when the test was being taken down. Since the turn server was destructed
on the signaling thread, a socket might still try and send to it after
it was destroyed causing a seg fault. This change creates/destroys the
TestTurnServers on the network thread to fix this issue.
Bug: None
Change-Id: I080098502b737f0972ce2fa5357920de057a3312
Reviewed-on: https://webrtc-review.googlesource.com/81301
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23590}
The functionality of regathering candidates is refactored to a separate
regathering controller owned by P2PTransportChannel. This refactoring
is part of a long-term plan to restructure a modularied
P2PTransportChannel and it would also benefit the addition of autonomous
regathering of candidates that is proactive to the ICE states in the
near future.
Bug: None
Change-Id: I74cea974ea628430c77b5d51b7c9179ddffc690d
Reviewed-on: https://webrtc-review.googlesource.com/75820
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23588}
The issue occurred if a control segment is received after a non-control
segment received out-of-order, which only happens if:
* The initial "connect" segment is lost, and retransmitted later.
* Both sides send "connect"s simultaneously (rather than having
designated server/client roles), such that the local side thinks a
connection is established even before its "connect" has been
acknowledged.
* Nagle algorithm disabled, allowing a data segment to be sent before
the "connect" has been acknowledged.
This may seem like a pretty specific set of circumstances, but it can
happen with chromoting.
See the linked bug for more details.
Bug: webrtc:9208
Change-Id: I3cfe26e02158fcc5843f32d4e2ef7c511d58d9c9
Reviewed-on: https://webrtc-review.googlesource.com/78861
Reviewed-by: Sergey Ulanov <sergeyu@google.com>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23477}
Disjoint subsets of the enum values are used for Ice candidate config
events and Ice candidate check events. This CL breaks out the config
part to a separate enum and by extension changes the icelogger interface
for config events.
Bug: webrtc:9336, webrtc:8111
Change-Id: I405b5c3981905c3c504b45afdddb3649469ed141
Reviewed-on: https://webrtc-review.googlesource.com/79943
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23464}
This is a kitchen-sink header, some pieces should be moved to
byteorder.h, the rest likely deleted.
Delete most includes of basictypes.h. In leaf headers,
include stddef.h and stdint.h explicitly where needed.
Bug: webrtc:6853
Change-Id: Ibc809936a8f94d418e4eb650da1e89c1b9142073
Reviewed-on: https://webrtc-review.googlesource.com/77721
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23333}
The existing asynchronous task execution in P2PTransportChannel is
implemented by posting messages to its network thread (a rtc::Thread)
and consuming these messages as a MessageHandler. The readability of
the implementation can be improved by using AsyncInvoker, which is
exactly designed for this scenario.
Bug: None
Change-Id: Ibee830d0d2bc19fc1ca5b894f194d9b69c40eef4
Reviewed-on: https://webrtc-review.googlesource.com/74642
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23267}
1) Network info is appended with its network ID assigned by the network
manager so that we can cross-reference networks by IDs in the log.
2) The local network info is added to the candidate pair string
representation so that we do not need the cross reference to the
logs of candidate gathering to find out the network where the local
candidate is from.
3) A flag is added to the candidate pair string representation to
indicate if this pair is the selected one.
4) Sorting of candidate pairs is logged with the reason of sorting
request.
5) Network filtering that takes place in the port allocator is
explicitly logged.
Bug: None
Change-Id: Iaa337394cad803515e26e254814aa04ed2213eab
Reviewed-on: https://webrtc-review.googlesource.com/72522
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23266}
GetAdapterTypeFromName determines the adapter type of a network
interface based on the string matching of the interface name. It however
does not have an entry to map the well-known "eth" name to the common
Ethernet type. This introduces subtle bugs when GetAdapterTypeFromName
is used as the only method to determine a network type and Ethernet is
thus identified as an unknown network, which affects the network
filtering and network path selection that rely on the network type.
Bug: webrtc:9235
Change-Id: Ifc3269d191382f3b3a041de1c9755c09994b31b2
Reviewed-on: https://webrtc-review.googlesource.com/74263
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@google.com>
Cr-Commit-Position: refs/heads/master@{#23195}
This extends the API surface so that
custom certificates can be provided by an API user in both the standalone and
factory creation paths for the OpenSSLAdapter. Prior to this change the SSL
roots were hardcoded in a header file and directly included into
openssladapter.cc. This forces the 100 kilobytes of certificates to always be
compiled into the library. This is undesirable in certain linking cases where
these certificates can be shared from another binary that already has an
equivalent set of trusted roots hard coded into the binary.
Support for removing the hard coded SSL roots has also been added through a new
build flag. By default the hard coded SSL roots will be included and will be
used if no other trusted root certificates are provided.
The main goal of this CL is to reduce total binary size requirements of WebRTC
by about 100kb in certain applications where adding these certificates is
redundant.
Change-Id: Ifd36d92b5cb32d1b3098a61ddfc244d76df8f30f
Bug: chromium:526260
Change-Id: Ifd36d92b5cb32d1b3098a61ddfc244d76df8f30f
Reviewed-on: https://webrtc-review.googlesource.com/64841
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23180}
This removes the redundant type and replaces all usages. A slight change
in behavior is that we no longer get nanosecond resolution. This should
not matter since no current code requires nanosecond resolution.
Bug: webrtc:9155
Change-Id: I04334e08c686d95731621a6c8a7e40400d0ae3b2
Reviewed-on: https://webrtc-review.googlesource.com/71163
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23174}
The existing rule regards a candidate pair as not receiving if it does
not receive any data packet, connectivity check, or connectivity check
response for a timeout period since the last receipt of any packet
above. A backup candidate pair typically sends connectivity checks at a
slow pace to preserve the battery life, and the existing rule however
declares receiving timeout for backup candidate pairs as a side effect.
This is a result of the conflicting value of the receiving timeout
period and the longer default connectivity check interval for backup
candidate pairs.
The new rule regards any candidate pair that has its last connectivity
check acknowledged by a response as receiving.
Bug: webrtc:9145
Change-Id: Ie0171fd83aca3d6a0a465885be32f0854856be7f
Reviewed-on: https://webrtc-review.googlesource.com/69784
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Honghai Zhang <honghaiz@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22892}
This is a reland of fc43d11717e16dd427ac84fee614e5511e43cefd
Original change's description:
> Add thread checker to PortAllocator and its subclasses and fix a bug
> causing memory contention by threads.
>
> PortAllocator and its subclasses assume all of their methods except the
> constructor must be called on the same thread (the network thread in
> practice). This CL adds a thread checker to PortAllocator and its
> subclasses for thread safety, and fixes bugs of invoking some of their
> methods in PeerConnection on the signaling thread.
>
> Bug: webrtc:9112
> Change-Id: I33ba9bae72ec09a45ec70435962f3f25cd31583c
> Reviewed-on: https://webrtc-review.googlesource.com/66945
> Commit-Queue: Qingsi Wang <qingsi@google.com>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22814}
Bug: webrtc:9112
Change-Id: I5c7377f05c0daccbe469e2fdbdfacabc5c222f4c
Reviewed-on: https://webrtc-review.googlesource.com/69422
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22889}
Per-packet info is now signaled in SentPacket to provide useful stats
for bandwidth consumption and overhead analysis in the network stack.
Bug: webrtc:9103
Change-Id: I2b8f6491567d0fa54cc559fc5a96d7aac7d9565e
Reviewed-on: https://webrtc-review.googlesource.com/66281
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22834}
This reverts commit fc43d11717e16dd427ac84fee614e5511e43cefd.
Reason for revert: Crashes downstream tests
Original change's description:
> Add thread checker to PortAllocator and its subclasses and fix a bug
> causing memory contention by threads.
>
> PortAllocator and its subclasses assume all of their methods except the
> constructor must be called on the same thread (the network thread in
> practice). This CL adds a thread checker to PortAllocator and its
> subclasses for thread safety, and fixes bugs of invoking some of their
> methods in PeerConnection on the signaling thread.
>
> Bug: webrtc:9112
> Change-Id: I33ba9bae72ec09a45ec70435962f3f25cd31583c
> Reviewed-on: https://webrtc-review.googlesource.com/66945
> Commit-Queue: Qingsi Wang <qingsi@google.com>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22814}
TBR=deadbeef@webrtc.org,pthatcher@google.com,pthatcher@webrtc.org,qingsi@google.com,honghaiz@webrtc.org
Change-Id: I2db6561d5d6366d38caa58c3e719d0d48eda70c2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9112
Reviewed-on: https://webrtc-review.googlesource.com/69200
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22818}
causing memory contention by threads.
PortAllocator and its subclasses assume all of their methods except the
constructor must be called on the same thread (the network thread in
practice). This CL adds a thread checker to PortAllocator and its
subclasses for thread safety, and fixes bugs of invoking some of their
methods in PeerConnection on the signaling thread.
Bug: webrtc:9112
Change-Id: I33ba9bae72ec09a45ec70435962f3f25cd31583c
Reviewed-on: https://webrtc-review.googlesource.com/66945
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22814}
This profile will now not be used unless the application explicitly
sets the flag in CryptoOptions to true. As a result, an 80-bit
authentication tag will be used instead of a 32-bit one. See bug for
more details.
Bug: webrtc:7670
Change-Id: I7c0a118fd7b1e7aac23b9eb8717099f055de0441
Reviewed-on: https://webrtc-review.googlesource.com/66600
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22757}
This patch adds TurnPort::Release that release a TURN allocation
by sending a REFRESH with lifetime 0 without destroying the object.
This allows for graceful shutdown of a TurnPort that can e.g be used
for mobility.
Bug: webtrc:9067
Change-Id: I1e4d9232ae08d6fe14f5612f776a541c03c3beec
Reviewed-on: https://webrtc-review.googlesource.com/64722
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22666}
IceConfig contains a set of parameters that affect the behavior of ICE.
Inconsistent or conflicting parameters lead to erroneous or
unpredicatble behavior in the network stack. Sanity checks are now added
to validate IceConfig.
TBR=magjed@webrtc.org
Bug: webrtc:8993
Change-Id: I708bc3f1ef970872754a82a47a509bda15061ca6
Reviewed-on: https://webrtc-review.googlesource.com/60847
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22664}
This patch modifies StunMessage to allow adding of attributes
in the 0x4000-0x7FFF range without adding them to stun.cc.
Before this patch this was allowed in the 0xC000-0xFFFF range
but the RFC specifies that both of these ranges are implementation
defined.
BUG=webrtc:8313
Change-Id: Ib74f5d02a06807aeca4fc3f1f3028271e233f004
Reviewed-on: https://webrtc-review.googlesource.com/64404
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22619}
conflict.
A role conflict received from an unknown address (peer reflexive
candidate) results in an early return before signaling the unknown
address to P2PTransportChannel. Without this signal, there is no
candidate pair or TURN entry created, and sending the error response
when handling the role conflict fails.
Bug: webrtc:9034
Change-Id: I0f1b232a574449e98025618d93aac8a91b30e14b
Reviewed-on: https://webrtc-review.googlesource.com/63840
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22588}
The convention is reinforced so that setting a rtc::Optional IceConfig
parameter to null restores the default value. Helper getters are added
to IceConfig to provide either user-defined value or the default.
Shared constants and config defaults used in p2p are moved to
p2pconstants.h/cc for future management with sanity checks.
Bug: webrtc:8993
Change-Id: I976cf1eef5a654b8911f449248bb2f3086279db8
Reviewed-on: https://webrtc-review.googlesource.com/61149
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22575}
Some implementations of std::max_element (used to find the "most
pingable" connection) seem to compare an element with itself, which
MorePingable doesn't handle.
Fixing by handling the self-comparison outside MorePingable.
Bug: webrtc:8697
Change-Id: Ieb34580f52037639c00041a4e65901cad92d0971
Reviewed-on: https://webrtc-review.googlesource.com/62402
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22543}
Also removing the implicit InterfaceAddress constructor that takes an
IPAddress, so that issues like this won't happen in the future.
And adding a convenience "Network::AddIP" method that takes an
IPAddress, so that code doing that (previously relying on the implicit
constructor) will continue to work.
Bug: webrtc:8972
Change-Id: Id5cf0fca481cfee3f8ab83412fcb41886535bba2
Reviewed-on: https://webrtc-review.googlesource.com/59461
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22504}