Commit Graph

301 Commits

Author SHA1 Message Date
38f8893235 WebRTC Bug 4865
Bug 4865: even without STUN/TURN, as long as the peer is on the open internet, the connectivity should work. This is actually a regression even for hangouts.

We need to issue the 0.0.0.0 candidate into Port::candidates_ and filter it out later. The reason is that when we create connection, we need a local candidate to match the remote candidate.

The same connection later will be updated with the prflx local candidate once the STUN ping response is received.

BUG=webrtc:4865
R=juberti@webrtc.org

Review URL: https://codereview.webrtc.org/1274013002 .

Cr-Commit-Position: refs/heads/master@{#9708}
2015-08-14 05:24:12 +00:00
5e56c5927e DtlsIdentityStoreInterface added and the implementation is called DtlsIdentityStoreImpl (previously named without the -Impl bit and without an interface).
DtlsIdentityStoreImpl is updated to take KeyType into account, something which will be relevant after this CL lands:
https://codereview.webrtc.org/1189583002

The DtlsIdentityService[Interface] classes are about to be removed (to be removed when Chromium no longer implements and uses the interface). This was an unnecessary layer of complexity. The FakeIdentityService is now instead a FakeDtlsIdentityStore.
Where a service was previously passed around, a store is now passed around.

Identity generation is now commonly performed using DtlsIdentityStoreInterface. Previously, if a service was not specified, WebRtcSessionDescriptionFactory could fall back on its own generation code. Now, a store has to be provided for generation to occur.

For more information about the steps being taken to land this without breaking Chromium, see referenced bug.

BUG=webrtc:4899
R=magjed@webrtc.org, tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1176383004 .

Cr-Commit-Position: refs/heads/master@{#9696}
2015-08-11 08:33:27 +00:00
c937139176 Regenerate bind.h using pump.py
BUG=webrtc:4690
R=pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/1261093005 .

Cr-Commit-Position: refs/heads/master@{#9682}
2015-08-06 10:41:04 +00:00
5b4ce3391d DtlsIdentityStoreInterface added.
New PeerConnectionFactoryInterface::CreatePeerConnection taking both service and store added (old CreatePC signature still exists).

This is CL is part of an effort to land https://codereview.webrtc.org/1176383004 without breaking Chromium.
See bug for more information.

BUG=webrtc:4899
R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1268363002 .

Cr-Commit-Position: refs/heads/master@{#9680}
2015-08-05 14:55:35 +00:00
b19eba3d4b Fix Turn TCP port issue.
Sometimes the port still try to send stun packet when the connection is disconnected,
causing an assertion error.

BUG=4859

Review URL: https://codereview.webrtc.org/1247573002

Cr-Commit-Position: refs/heads/master@{#9671}
2015-08-03 17:23:40 +00:00
28bae02bd3 Remove CircularFileStream / replace it with CallSessionFileRotatingStream.
BUG=4838, 4839

Review URL: https://codereview.webrtc.org/1245143005

Cr-Commit-Position: refs/heads/master@{#9628}
2015-07-23 19:27:06 +00:00
934119111e Provides log sinks for rotating logs. Intended for use on mobile devices to record call logs.
BUG=4838

Review URL: https://codereview.webrtc.org/1230823009

Cr-Commit-Position: refs/heads/master@{#9615}
2015-07-22 19:12:22 +00:00
235c35f292 Implement store as an explicit atomic operation.
Using explicit atomic operations permits TSan to understand them and
prevents false positives.

Downgrading the atomic Load to acquire semantics. This reduces the
number of memory barriers inserted from two down to one at most.

Also renaming Load/Store to AcquireLoad/ReleaseStore.

BUG=chromium:512382
R=dvyukov@chromium.org, glider@chromium.org
TBR=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1246073002

Cr-Commit-Position: refs/heads/master@{#9613}
2015-07-22 15:35:04 +00:00
65eb1c3df9 Disable testcase NatTcpTest.TestConnectOut
TBR=pthatcher
BUG=webrtc:4863

Review URL: https://codereview.webrtc.org/1248123002

Cr-Commit-Position: refs/heads/master@{#9610}
2015-07-22 13:28:33 +00:00
c5d0d95fd8 Ensuring that UDP TURN servers are always used as STUN servers.
This was already working in most cases, but not for some corner cases:
* If the PORTALLOCATOR_ENABLE_SHARED_SOCKET flag is not set
* If both a STUN server and TURN server are configured

I added unit tests for these cases, and centralized the code that gets
STUN server addresses in order to fix these and any related issues.

BUG=webrtc:4215

Review URL: https://codereview.webrtc.org/1215713003

Cr-Commit-Position: refs/heads/master@{#9596}
2015-07-16 17:22:28 +00:00
2d3b7e2173 AppRTCDemo file logging.
Adds logging macros to log logs to a file. Undeletes CircularFileStream
for that purpose.

BUG=
R=jiayl@webrtc.org, pbos@webrtc.org

Review URL: https://codereview.webrtc.org/1217473011 .

Cr-Commit-Position: refs/heads/master@{#9582}
2015-07-14 19:55:56 +00:00
ba35d05a49 Cleanup of iOS AudioDevice implementation
TBR=tkchin
BUG=webrtc:4789
TEST=modules_unittests --gtest_filter=AudioDeviceTest* and AppRTCDemo

Review URL: https://codereview.webrtc.org/1206783002 .

Cr-Commit-Position: refs/heads/master@{#9578}
2015-07-14 15:04:19 +00:00
5d6e58e76e Improvements to rtc::Bind
BUG=webrtc:4690

Support for rtc::scoped_ptr as return type.
Support for up to 6 input parameters.

R=pthatcher@webrtc.org, solenberg@webrtc.org

Review URL: https://codereview.webrtc.org/1226153003 .

Cr-Commit-Position: refs/heads/master@{#9569}
2015-07-13 09:16:47 +00:00
97f44e1bf6 Remove a superfluous qualifier on an inline method.
Fixes
..\..\third_party\webrtc/base/stringutils.h(295,49) :  warning(clang): extra qualification on member "empty_str" [-Wmicrosoft]

No behavior change, but makes the code more standards-conformant.

BUG=chromium:505296

Review URL: https://codereview.webrtc.org/1228193002

Cr-Commit-Position: refs/heads/master@{#9562}
2015-07-09 23:45:55 +00:00
e987a47f95 Removed some unused variables in Windows code.
Note: Regarding the ICMP6_CLOSE_FUNC variable in winping.cc,
Icmp6CloseHandle does not exist, and IcmpCloseHandle is the correct way
to close an IPv6 handle. Therefore the existing code is correct to use
close_ on both types of connections and this variable is unnecessary.

BUG=505319

Review URL: https://codereview.webrtc.org/1231653003

Cr-Commit-Position: refs/heads/master@{#9555}
2015-07-09 07:54:02 +00:00
a771bf8ee8 Fix some clang warnings with -Wmissing-braces in WebRTC.
Clang warns if there are missing braces around a subobject
initializer. The most common idiom that triggers this is:
  STRUCT s = {0};
if the first field of STRUCT is itself a struct. This can
be more simply written as:
  STRUCT s = {};
which also prevents the warning from firing.

Other instances of the warning have been fixed by adding
braces where appropriate.

BUG=505297
TBR=jiayl@webrtc.org

Review URL: https://codereview.webrtc.org/1216353002

Cr-Commit-Position: refs/heads/master@{#9529}
2015-07-02 00:52:18 +00:00
ecb9a70c2d Add AsyncInvoker files for chromium GN build
TBR=pthatcher@webrtc.org
BUG=4576

Review URL: https://codereview.webrtc.org/1196993003.

Cr-Commit-Position: refs/heads/master@{#9481}
2015-06-22 06:37:09 +00:00
2ee2439a1f Merge video_engine_core into webrtc target.
Merges the two video targets since video_engine is no longer usable
standalone.

BUG=webrtc:1695
R=mflodman@webrtc.org, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1184763009.

Cr-Commit-Position: refs/heads/master@{#9479}
2015-06-22 05:57:26 +00:00
dc13abc331 Initially when the design was to do this experiment in browser, which doesn't have webrtc code, it requires some glue code to bridge the difference between what's available in webrtc::base and browser process. Now since we're moving to renderer process, we could reuse a lot of existing interfaces instead of rolling our own.
BUG=webrtc:4576
R=pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/1173353002.

Cr-Commit-Position: refs/heads/master@{#9466}
2015-06-18 21:44:46 +00:00
979e0b30f1 Define uint64 and int64 using long long.
This is to avoid typedef collisions with some compile configurations.
For more info, see
https://blogs.oracle.com/nike/entry/ilp64_lp64_llp64
http://www.unix.org/whitepapers/64bit.html

BUG=4497

Review URL: https://codereview.webrtc.org/1186093004

Cr-Commit-Position: refs/heads/master@{#9451}
2015-06-16 14:13:40 +00:00
524f78456c disable MacAsyncSocketTest::TestConnectFailIPv6
BUG=webrtc:4738
R=kjellander@webrtc.org
TBR=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1179983003

Cr-Commit-Position: refs/heads/master@{#9439}
2015-06-15 14:03:58 +00:00
1fe120a6b9 Add triggered checks.
BUG=4590
R=guoweis@webrtc.org, juberti@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/51979004.

Cr-Commit-Position: refs/heads/master@{#9409}
2015-06-10 18:33:24 +00:00
f4baca50bb Set mtu for DTLS to 1280
Set mtu for DTLS to 1280, otherwise it defaults to 256 in recent
versions of openssl.

R=juberti@webrtc.org

Review URL: https://codereview.webrtc.org/1174483002.

Cr-Commit-Position: refs/heads/master@{#9407}
2015-06-10 07:46:05 +00:00
8f622a9f83 Locking is no longer required with BoringSSL.
BoringSSL handles locking internally, so the various callback methods
are no longer required in this case.

R=juberti@webrtc.org

Review URL: https://codereview.webrtc.org/1158573008

Cr-Commit-Position: refs/heads/master@{#9388}
2015-06-06 11:09:38 +00:00
e973c2a63b Remove win32toolhelp.h.
Unittests flake when run in parallel, and this file isn't used.

BUG=
R=tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/53659004

Cr-Commit-Position: refs/heads/master@{#9368}
2015-06-04 08:25:12 +00:00
a398020cba SSL_set_read_ahead no longer needed with BoringSSL.
In https://boringssl-review.googlesource.com/#/c/4820/ BoringSSL
deprecated "SSL_set_read_ahead". That commit has rolled into
Chromium/WebRTC, so calling the function is no longer needed.

BUG=chromium:447431
R=juberti@google.com

Review URL: https://webrtc-codereview.appspot.com/55559004

Cr-Commit-Position: refs/heads/master@{#9355}
2015-06-02 21:07:50 +00:00
770cc380eb Don't call CRYPTO_add in BoringSSL.
The old OpenSSL threading hooks were removed in favor of the library knowing
about threads internally. Instead of CRYPTO_add, use FOO_up_ref wrappers that
don't require reaching into the type.

BUG=none
R=jiayl@webrtc.org, juberti@google.com

Review URL: https://webrtc-codereview.appspot.com/54579004

Cr-Commit-Position: refs/heads/master@{#9324}
2015-05-28 22:36:37 +00:00
35448372be Disable reusing of ECDHE keys with NSS.
This provides support for ephemeral ECDHE keys when using NSS.

BUG=4689
R=juberti@google.com, pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/56459005

Cr-Commit-Position: refs/heads/master@{#9323}
2015-05-28 22:29:17 +00:00
fec2c6d7eb Prevent potential double-free if srtp_create fails.
If srtp_create fails while adding streams, it deallocates the session
but doesn't clear the passed pointer which then could lead to a
double-free in the SrtpSession dtor.

The CL also adds locking for libsrtp initialization / shutdown.

BUG=4042
R=jiayl@webrtc.org, juberti@google.com, pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/47319004

Cr-Commit-Position: refs/heads/master@{#9300}
2015-05-27 21:41:52 +00:00
5d55c98cd2 WebRTC 4521: Remove usage of deprecated timezone global variable
BUG=4521
R=pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/56469004

Cr-Commit-Position: refs/heads/master@{#9285}
2015-05-26 18:53:39 +00:00
57e5fd2e60 PRESUBMIT: Improve PyLint check and add GN format check.
Add pylintrc file based on
https://code.google.com/p/chromium/codesearch#chromium/src/tools/perf/pylintrc
bit tightened up quite a bit (the one in depot_tools is far
more relaxed).

Remove a few excluded directories from pylint check and fixed/
suppressed all warnings generated.

Add GN format check + formatted all GN files using 'gn format'.
Cleanup redundant rules in tools/PRESUBMIT.py

TESTED=Ran 'git cl presubmit -vv', fixed the PyLint violations.
Ran it again with a modification in webrtc/build/webrtc.gni, formatted
all the GN files and ran it again.

R=henrika@webrtc.org, phoglund@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/50069004

Cr-Commit-Position: refs/heads/master@{#9274}
2015-05-25 10:55:50 +00:00
00aac5aacf Some cleanup for base/logging and base/stream.h
* Fix race when calling UpdateMinLogSeverity
* Remove unused 'diagnostic mode'
* Remove LogToStream
* Fix ctor of StringStream
* Delete POpenStream
* Delete AsyncWriteStream
* Delete CircularFileStream
* Delete StreamSegment

BUG=
R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/57429004

Cr-Commit-Position: refs/heads/master@{#9273}
2015-05-25 09:26:08 +00:00
23edcff7a9 Move base/logging.* to rtc_base_approved.
BUG=
R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/47299004

Cr-Commit-Position: refs/heads/master@{#9272}
2015-05-25 08:45:51 +00:00
0eefb4d5c3 Detach base/logging.* from base/stream.*.
This is being done in preparation of moving base/logging.* to rtc_base_approved. base/stream.* has libjingle dependencies that webrtc can't use, so logging.* can't depend on streams. It does look like stream.* isn't used much, so cleaning that up as well as cleaning up usage of the actual stream support (now LogStream) in the logging code, is in order, but I'll leave that to another cl.

BUG=
R=pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/54529004

Cr-Commit-Position: refs/heads/master@{#9269}
2015-05-23 07:54:19 +00:00
469c2c04aa Make Config::default_value leak instead of having an exit-time destructor.
I wanted to use Config::Get in Chromium code, but it triggered the following
warning:
../../third_party/webrtc/common.h:89:20: error: declaration requires an exit-time destructor [-Werror,-Wexit-time-destructors]
    static const T def;
                   ^
../../third_party/webrtc/common.h:110:10: note: in instantiation of function template specialization requested here
  return default_value<T>();
         ^

I assume we don't hit this in webrtc because the warning is disabled.

This also switches to the RTC_ prefix from the deprecated LIBJINGLE_.

Needed due to this Chromium CL:
https://codereview.chromium.org/1148843004/

R=andresp@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/53459004

Cr-Commit-Position: refs/heads/master@{#9268}
2015-05-23 00:50:33 +00:00
5fdcdf66d0 Enable ciphers to get ECDHE with NSS.
With this change, DTLS 1.0 uses "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
DTLS 1.2 uses "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256".

BUG=chromium:428343
R=juberti@google.com

Review URL: https://webrtc-codereview.appspot.com/52549004

Cr-Commit-Position: refs/heads/master@{#9255}
2015-05-21 16:05:58 +00:00
6f2ef74b42 Keep track of DTLS packet sizes to prevent partial reads.
The current use of rtc::FifoBuffer can lead to reading across DTLS packet
boundaries which could cause packets to not being processed correctly.

This CL introduces the new class rtc::BufferQueue and changes the
StreamInterfaceChannel to use it instead of the rtc::FifoBuffer.

BUG=chromium:447431
R=juberti@google.com

Review URL: https://webrtc-codereview.appspot.com/52509004

Cr-Commit-Position: refs/heads/master@{#9254}
2015-05-21 15:51:41 +00:00
02ff9117b5 Feature merge request:
Add support for iOS http proxy detection

R=pthatcher@webrtc.org, tkchin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/45439004

Patch from Yuriy Shevchuk <youwrk@gmail.com>.

Cr-Commit-Position: refs/heads/master@{#9250}
2015-05-21 11:50:41 +00:00
8eb76ff32a Make SHA1 computation thread-safe.
Previously SHA1Transform() kept a static buffer. As result SHA1 was not
always computed correctly when running that code in parallel on multiple
threads. That was causing spurious messages about invalid Message
Integrity attribute when running some tests in chromoting.

R=pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/57379004

Cr-Commit-Position: refs/heads/master@{#9238}
2015-05-20 18:25:21 +00:00
831c5585c7 Allow setting maximum protocol version for SSL stream adapters.
This CL adds an API to SSL stream adapters to set the maximum allowed
protocol version and with that implements support for DTLS 1.2.
With DTLS 1.2 the default cipher changes in the unittests as follows.

BoringSSL
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA -> TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256

NSS
TLS_RSA_WITH_AES_128_CBC_SHA -> TLS_RSA_WITH_AES_128_GCM_SHA256

BUG=chromium:428343
R=juberti@google.com

Review URL: https://webrtc-codereview.appspot.com/50989004

Cr-Commit-Position: refs/heads/master@{#9232}
2015-05-20 10:48:24 +00:00
5ca688b3da Enable read-ahead on OpenSSL DTLS stream adapters.
Prevent multiple BIO reads when reading header and body but read from
internal OpenSSL buffer where possible.

BUG=chromium:447431
R=davidben@chromium.org, juberti@google.com

Review URL: https://webrtc-codereview.appspot.com/46319004

Cr-Commit-Position: refs/heads/master@{#9230}
2015-05-20 08:40:03 +00:00
97bce58ed9 Disable the EXPECT_DEATH check in bitbuffer on Android
BUG=4364
R=noahric@chromium.org, pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/46349004

Cr-Commit-Position: refs/heads/master@{#9226}
2015-05-19 20:17:40 +00:00
bf560ddf91 remove filelock which is now unused
R=pthatcher@webrtc.org

Committed: https://crrev.com/5ece00f7fa15407314aa27ae5c262a86f004468a
Cr-Commit-Position: refs/heads/master@{#9222}

Review URL: https://webrtc-codereview.appspot.com/51859004

Cr-Commit-Position: refs/heads/master@{#9225}
2015-05-19 20:14:41 +00:00
5ece00f7fa remove filelock which is now unused
R=pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/51859004

Cr-Commit-Position: refs/heads/master@{#9222}
2015-05-19 18:07:02 +00:00
ea14f0ac11 Move SetCurrentThreadName to platform_thread.* in rtc_base_approved,
update all webrtc and libjingle code to use the same function and remove
extra implementations.

BUG=
R=andresp@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/55439004

Cr-Commit-Position: refs/heads/master@{#9205}
2015-05-18 11:50:31 +00:00
a6e883bc6b Fix constant in SetCurrentThreadName.
TBR=juberti@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/46329004

Cr-Commit-Position: refs/heads/master@{#9202}
2015-05-18 07:55:20 +00:00
bebc69010d Add platform_thread source files and move types from thread_checker_impl to there.
BUG=
R=henrika@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/52529004

Cr-Commit-Position: refs/heads/master@{#9201}
2015-05-18 07:51:16 +00:00
144d01850b fix indent on tokenize_first function signatures
R=juberti@google.com, pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/52499004

Cr-Commit-Position: refs/heads/master@{#9198}
2015-05-15 20:14:13 +00:00
1cf6f8101a Add logging for sending and receiving STUN binding requests and TURN requests and responses.
BUG=
R=guoweis@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/46189004

Cr-Commit-Position: refs/heads/master@{#9195}
2015-05-15 17:40:34 +00:00
0e07f92043 Split fmtp on semicolons not spaces as per RFC6871
BUG=4617
R=pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/47169004

Cr-Commit-Position: refs/heads/master@{#9193}
2015-05-15 16:21:16 +00:00