471 Commits

Author SHA1 Message Date
zhihuang
a3095d001b Re-enable the P2PTransportChannelMultihomedTest.TestBasic
BUG=webrtc:2409

Review-Url: https://codereview.webrtc.org/2485963002
Cr-Commit-Position: refs/heads/master@{#15030}
2016-11-10 21:59:50 +00:00
johan
6bedebfb7a First step in providing a UdpTransportChannel.
Some applications explicitly require RFC3550 style RTP without ICE.
Port number requirement of RFC3550 section 11 will be addressed in a follow-up CL.

BUG=webrtc:6436

Review-Url: https://codereview.webrtc.org/2377883003
Cr-Commit-Position: refs/heads/master@{#15005}
2016-11-09 21:44:13 +00:00
honghaiz
7252a00b9f Ping the premier connection on each network with higher priority.
When the selected connection becomes not receiving and there are many connections,
If we use a round-robin fashion to ping all connections, none of the connections will
be in receiving state for sufficient long time to ensure switching connections promptly.
Triggered check will help in this situation to some extent but it may still fail to switch promptly when there are a lot of connections.

With this CL, if the selected connection is weak, once we find a writable connection on a network we start to ping it with a higher priority to keep it in receiving state.
Plus, if the selected connection is weak, we choose a shorter ping interval (900ms) for all writable connections.

BUG=b/32022719

Review-Url: https://codereview.webrtc.org/2369963004
Cr-Commit-Position: refs/heads/master@{#14991}
2016-11-09 04:04:14 +00:00
charujain
aca3a249c3 Moving stun_prober target from webrtc/p2p to webrtc/examples
BUG=webrtc:6440
NOTRY=True

Review-Url: https://codereview.webrtc.org/2460343002
Cr-Commit-Position: refs/heads/master@{#14869}
2016-11-01 10:09:19 +00:00
johan
15ca8f6aeb Let receiving() and SignalRecevingState be part of rtc::PacketTransportInterface.
Writable() and the related signal are already part of rtc::PacketTransportInterface. Sense of code symmetry aesthetics dictates that receiving() and the related signal should be declared in the same place.

BUG=webrtc:6531

Review-Url: https://codereview.webrtc.org/2444793003
Cr-Commit-Position: refs/heads/master@{#14865}
2016-11-01 08:47:48 +00:00
kjellander
6ceab08322 GN: New conventions, default target and refactorings
Introduce a convention on categorizing GN targets:
1. Production code
2. Tests
3. Examples
4. Tools
The first two have targets spread out all over the tree,
while the latter are isolated to examples/ and tools/ directories.

Another new convention: Each directory's BUILD.gn file shall contain
a target named similar to the directory name. This target shall
contain the 'most common' production code, i.e. so that most
consumers of the directory can depend on only the directory
(which implicitly means that target in GN).

//webrtc:webrtc_tests is changed to depend on all WebRTC tests.
From now on, it's necessary to add new test targets to this dependency
tree in order to get them compiled.

Two new group targets are created:
//webrtc/modules/audio_coding:audio_coding_tests
//webrtc/modules/audio_processing:audio_processing_tests
to reduce the long list of tests in //webrtc:webrtc_tests.

Visibility on //webrtc:webrtc and  //webrtc:webrtc_tests is restricted
to the root target, to avoid circular dependencies due to the monolithic
property of these targets (a problem we've had in the past).

The 'root' target at the top level is renamed to 'default', which means GN will
build this target instead of _all_ generated targets
(see https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/faq.md#Can-I-control-what-targets-are-built-by-default).
This target now depends on everything we want to build, meaning all targets now
explicitly needs to be wired up from the root target in order to get build.
Having this, the number of compiled objects on Android is decreased from 8855 to 6276. It also gives us better control over our build.

BUG=webrtc:6440
TESTED=git cl try --clobber
NOTRY=True

Review-Url: https://codereview.webrtc.org/2441383002
Cr-Commit-Position: refs/heads/master@{#14821}
2016-10-28 12:44:07 +00:00
deadbeef
9922016ee4 Fix "IsLoopbackIp" to cover all loopback addresses; not just 127.0.0.1.
The loopback range is 127.0.0.0/8, which is everything from 127.0.0.0 to
127.255.255.255.

BUG=chromium:649118

Review-Url: https://codereview.webrtc.org/2445933003
Cr-Commit-Position: refs/heads/master@{#14807}
2016-10-28 01:30:28 +00:00
honghaiz
a73df559d6 Do not rely on specific ordering on generated candidates in TestGetAllPortsPortRange
This fixes another WebRTC swarming tests.

BUG=webrtc:6500

Review-Url: https://codereview.webrtc.org/2450983002
Cr-Commit-Position: refs/heads/master@{#14804}
2016-10-27 18:44:24 +00:00
johan
d89ab145cd Introduce rtc::PacketTransportInterface and let cricket::TransportChannel inherit.
Introduce rtc::PacketTransportInterface. Refactor cricket::TransportChannel.
Fix signal slots parameter types in all related code.

BUG=webrtc:6531

Review-Url: https://codereview.webrtc.org/2416023002
Cr-Commit-Position: refs/heads/master@{#14778}
2016-10-25 17:50:41 +00:00
johan
57e13defc7 Minor cleanup of rtc::BasicPacketSocketFactory implementation.
Remove unnecessary rtc:: namespace prefixes. Add #include <string>.

BUG=None

Review-Url: https://codereview.webrtc.org/2427413004
Cr-Commit-Position: refs/heads/master@{#14777}
2016-10-25 17:15:14 +00:00
kjellander
af1ae310ef Remove dead dependencies on xmllite and xmpp.
media/ and p2p/ doesn't actually depend on these anymore.

BUG=webrtc:5539
NOTRY=True

Review-Url: https://codereview.webrtc.org/2447533003
Cr-Commit-Position: refs/heads/master@{#14761}
2016-10-25 08:27:17 +00:00
honghaiz
e58d73d23e Fix more swarming test failures by using the fake clock or longer timeout.
In the swarming test, the machines sometimes were blocked for 1-2 seconds without processing anything.
This CL makes sure that 1 second timeout is only used with fake clock.

BUG=webrtc:6500

Review-Url: https://codereview.webrtc.org/2442813002
Cr-Commit-Position: refs/heads/master@{#14756}
2016-10-24 23:38:31 +00:00
deadbeef
fb70b45030 Preventing TURN redirects to loopback addresses.
This can be used for a certain security exploit, and doesn't have any
other practical applications we know of.

BUG=chromium:649118

Review-Url: https://codereview.webrtc.org/2440043004
Cr-Commit-Position: refs/heads/master@{#14751}
2016-10-24 20:16:07 +00:00
Honghai Zhang
161a586b45 Fix some flaky tests by using longer timeout and/or fake clock.
Also use const variables for timeout values.

BUG=webrtc:6500
R=deadbeef@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14711}
2016-10-20 18:47:19 +00:00
johan
a9c7cfac41 Prepare for introduction of rtc::PacketTransportInterface.
A rtc::PacketTransportInterface typedef is introduced to allow preparing
downstream projects for the upcoming refactoring of
cricket::Transport. This refactoring will introduce
rtc::PacketTransportInterface in https://codereview.webrtc.org/2416023002/ .

BUG=webrtc:6531

Review-Url: https://codereview.webrtc.org/2429803002
Cr-Commit-Position: refs/heads/master@{#14672}
2016-10-18 22:38:43 +00:00
bertholdherrmann08
1203066236 Compilerwarning possible loss of data in file port.h
BUG=webrtc:6179

Review-Url: https://codereview.webrtc.org/2224323002
Cr-Commit-Position: refs/heads/master@{#14671}
2016-10-18 21:00:06 +00:00
johan
27c3d5b652 Restore thread name consistency for webrtc/p2p/ .
Thread variables were named worker_thread, while they actually
reference the network_thread introduced with the CLs below.

Original introduction of network_thread:
https://codereview.webrtc.org/1895813003
https://codereview.webrtc.org/1903393004

Renming of woker_thread_ to network_thread_ in P2PTransportChannel:
https://codereview.webrtc.org/2378573003

BUG=webrtc:6432

Review-Url: https://codereview.webrtc.org/2396513003
Cr-Commit-Position: refs/heads/master@{#14646}
2016-10-17 07:55:03 +00:00
kjellander
e40a7ee007 GN: Exclude suppressions of Chromium Clang warnings for Chromium builds.
These suppressions are causing GN errors when Chromium targets are depending
directly on WebRTC targets (needed for https://codereview.chromium.org/2413103004)

BUG=webrtc:4256
NOTRY=True

Review-Url: https://codereview.webrtc.org/2408133008
Cr-Commit-Position: refs/heads/master@{#14644}
2016-10-17 06:56:20 +00:00
sprang
716978d075 Revert of Prune connections based on network name. (patchset #3 id:130001 of https://codereview.webrtc.org/2395243005/ )
Reason for revert:
Breaks upstream code.

Original issue's description:
> Prune connections based on network name.
> Previously we prune connections on the same network pointer.
> So if an IPv6 and an IPv4 network are on the same network interface, IPv4 connection won't be pruned even if an IPv6 connection with higher priority becomes writable.
>
> With this change, as long as one connection becomes writable, all connections  having lower priority with the same network name will be pruned.
>
> Also simplify the implementation.
>
> BUG=webrtc:6512
>
> Committed: https://crrev.com/aae2784c1fab9d1510393dec15d76caa574e2da8
> Cr-Commit-Position: refs/heads/master@{#14593}

TBR=skvlad@webrtc.org,honghaiz@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6512

Review-Url: https://codereview.webrtc.org/2412433003
Cr-Commit-Position: refs/heads/master@{#14601}
2016-10-11 13:43:36 +00:00
honghaiz
aae2784c1f Prune connections based on network name.
Previously we prune connections on the same network pointer.
So if an IPv6 and an IPv4 network are on the same network interface, IPv4 connection won't be pruned even if an IPv6 connection with higher priority becomes writable.

With this change, as long as one connection becomes writable, all connections  having lower priority with the same network name will be pruned.

Also simplify the implementation.

BUG=webrtc:6512

Review-Url: https://codereview.webrtc.org/2395243005
Cr-Commit-Position: refs/heads/master@{#14593}
2016-10-10 23:00:49 +00:00
Honghai Zhang
d93f50cd57 Add UMA metrics for ICE regathering reasons.
BUG=webrtc:6462
R=deadbeef@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14531}
2016-10-05 18:47:39 +00:00
nisse
3d7901d1bd Delete httpportallocator.h.
BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2392913002
Cr-Commit-Position: refs/heads/master@{#14516}
2016-10-05 07:46:49 +00:00
deadbeef
dd7fb43f28 Emit SignalReadyToSend even for "presumed writable" connections.
The Connection class will now blindly forward SignalReadyToSend, and
P2PTransportChannel will decide whether to forward it further (which
it was already doing).

BUG=webrtc:6448

Review-Url: https://codereview.webrtc.org/2374183005
Cr-Commit-Position: refs/heads/master@{#14462}
2016-09-30 22:16:57 +00:00
deadbeef
89824f6fe0 Relanding: Allow the DTLS fingerprint verification to occur after the handshake.
This means the DTLS handshake can make progress while the SDP answer
containing the fingerprint is still in transit. If the signaling path
if significantly slower than the media path, this can have a moderate
impact on call setup time.

Of course, until the fingerprint is verified no media can be sent. Any
attempted write will result in SR_BLOCK.

This essentially fulfills the requirements of RFC 4572, Section 6.2:

   Note that when the offer/answer model is being used, it is possible
   for a media connection to outrace the answer back to the offerer.
   Thus, if the offerer has offered a 'setup:passive' or 'setup:actpass'
   role, it MUST (as specified in RFC 4145 [2]) begin listening for an
   incoming connection as soon as it sends its offer.  However, it MUST
   NOT assume that the data transmitted over the TLS connection is valid
   until it has received a matching fingerprint in an SDP answer.  If
   the fingerprint, once it arrives, does not match the client's
   certificate, the server endpoint MUST terminate the media connection
   with a bad_certificate error, as stated in the previous paragraph.

BUG=webrtc:6387

Review-Url: https://codereview.webrtc.org/2163683003
Cr-Commit-Position: refs/heads/master@{#14461}
2016-09-30 18:55:49 +00:00
Honghai Zhang
b73d269707 Replace RelayPort with TurnPort in p2ptransportchannel tests.
Also remove the relay servers in the tests.
Most of the code and the downstream apps are using TurnPort, not RelayPort. Most of the tests in this file are not using RelayPort anyway.

BUG=None
R=deadbeef@webrtc.org

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

Committed: https://crrev.com/c8d21712dde64c7d613d1ea56c840438505a909f
Cr-Original-Commit-Position: refs/heads/master@{#14441}
Cr-Commit-Position: refs/heads/master@{#14446}
2016-09-30 05:46:16 +00:00
honghaiz
75f6626718 Revert of Replace RelayPort with TurnPort in p2ptransportchannel tests. (patchset #2 id:40001 of https://codereview.webrtc.org/2380923002/ )
Reason for revert:
It caused some tests in p2ptransportchannel flaky.

Original issue's description:
> Replace RelayPort with TurnPort in p2ptransportchannel tests.
>
> Also remove the relay servers in the tests.
> Most of the code and the downstream apps are using TurnPort, not RelayPort. Most of the tests in this file are not using RelayPort anyway.
>
> BUG=None
> R=deadbeef@webrtc.org
>
> Committed: https://crrev.com/c8d21712dde64c7d613d1ea56c840438505a909f
> Cr-Commit-Position: refs/heads/master@{#14441}

TBR=deadbeef@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=None

Review-Url: https://codereview.webrtc.org/2385563002
Cr-Commit-Position: refs/heads/master@{#14443}
2016-09-30 01:17:36 +00:00
Honghai Zhang
c8d21712dd Replace RelayPort with TurnPort in p2ptransportchannel tests.
Also remove the relay servers in the tests.
Most of the code and the downstream apps are using TurnPort, not RelayPort. Most of the tests in this file are not using RelayPort anyway.

BUG=None
R=deadbeef@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14441}
2016-09-29 21:51:36 +00:00
johan
0fd22ef0ae Rename P2PTransportChannel worker_thread_ to network_thread_.
Restore consistency of thread names in ThreadController and P2PTransportChannel.
This is a follow-up for https://codereview.webrtc.org/1895813003 and https://codereview.webrtc.org/1903393004.

BUG=webrtc:6432

Review-Url: https://codereview.webrtc.org/2378573003
Cr-Commit-Position: refs/heads/master@{#14426}
2016-09-29 08:19:28 +00:00
nisse
de2920cb46 Delete unused file sessionid.h.
BUG=None.

Review-Url: https://codereview.webrtc.org/2370723002
Cr-Commit-Position: refs/heads/master@{#14387}
2016-09-27 06:28:51 +00:00
kjellander
b62dbbe985 GN: Change rtc_source_set targets --> rtc_static_library
This changes most non-test related rtc_source_set targets to be
rtc_static_library instead. Targets without any .cc files are excluded.
This should bring back the build behavior we used to have with GYP
(i.e. same symbols exported in the libjingle_peerconnection.a file, which
are used by some downstream projects).

After doing an Android build with these changes:
$ nm --defined-only -g -C out/Release/lib.unstripped/libjingle_peerconnection_so.so | grep -i createpeerconnectionf
00077c51 T Java_org_webrtc_PeerConnectionFactory_nativeCreatePeerConnectionFactory
$ nm --defined-only -g -C out/Release/obj/webrtc/api/libjingle_peerconnection.a | grep -i createpeerconnectionf
00000001 T webrtc::CreatePeerConnectionFactory(rtc::Thread*, rtc::Thread*, rtc::Thread*, webrtc::AudioDeviceModule*, cricket::WebRtcVideoEncoderFactory*, cricket::WebRtcVideoDecoderFactory*)
00000001 T webrtc::CreatePeerConnectionFactory()

See https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/cookbook.md#Note-on-static-libraries
for more details on this.

NOTICE: This should be further cleaned up in the future, to reduce
binary bloat and unnecessary linking time. Right now it's more
important to restore the desired build output though.

BUG=webrtc:6410, chromium:630755

Review-Url: https://codereview.webrtc.org/2361623004
Cr-Commit-Position: refs/heads/master@{#14364}
2016-09-23 07:38:58 +00:00
Honghai Zhang
3e02430587 Fix a stun attribute leak.
In https://cs.chromium.org/chromium/src/third_party/webrtc/p2p/base/stun.cc?rcl=1474384719&l=352,
if read returned false, the created attr would not be released.

BUG=chromium:648064
R=skvlad@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14357}
2016-09-22 16:52:30 +00:00
johan
02bd5125e9 Remove dead code branches from P2PtransportChannel unittest.
BUG=None

Review-Url: https://codereview.webrtc.org/2318173002
Cr-Commit-Position: refs/heads/master@{#14299}
2016-09-20 07:23:33 +00:00
deadbeef
81f6f4fc56 Revert of Allow the DTLS fingerprint verification to occur after the handshake. (patchset #11 id:200001 of https://codereview.webrtc.org/2163683003/ )
Reason for revert:
Broke a downstream user of SSLStreamAdapter. Need to add the new interface (returning error code instead of bool) in a backwards compatible way.

Original issue's description:
> Allow the DTLS fingerprint verification to occur after the handshake.
>
> This means the DTLS handshake can make progress while the SDP answer
> containing the fingerprint is still in transit. If the signaling path
> if significantly slower than the media path, this can have a moderate
> impact on call setup time.
>
> Of course, until the fingerprint is verified no media can be sent. Any
> attempted write will result in SR_BLOCK.
>
> This essentially fulfills the requirements of RFC 4572, Section 6.2:
>
>    Note that when the offer/answer model is being used, it is possible
>    for a media connection to outrace the answer back to the offerer.
>    Thus, if the offerer has offered a 'setup:passive' or 'setup:actpass'
>    role, it MUST (as specified in RFC 4145 [2]) begin listening for an
>    incoming connection as soon as it sends its offer.  However, it MUST
>    NOT assume that the data transmitted over the TLS connection is valid
>    until it has received a matching fingerprint in an SDP answer.  If
>    the fingerprint, once it arrives, does not match the client's
>    certificate, the server endpoint MUST terminate the media connection
>    with a bad_certificate error, as stated in the previous paragraph.
>
> BUG=webrtc:6387
> R=mattdr@webrtc.org, pthatcher@webrtc.org
>
> Committed: https://crrev.com/042041bf9585f92e962387c59ca805f1218338f9
> Cr-Commit-Position: refs/heads/master@{#14296}

TBR=pthatcher@webrtc.org,mattdr@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6387

Review-Url: https://codereview.webrtc.org/2352863003
Cr-Commit-Position: refs/heads/master@{#14298}
2016-09-20 00:21:00 +00:00
Honghai Zhang
c67e0f5753 Signal to remove remote candidates if ports are pruned.
Previously when a Turn port is pruned, if its candidate has been sent to the remote side, the remote side will keep the candidate and use that to create connections.
We now signal the remote side to remove the candidates so that at least no new connection will be created using the removed candidates.

Also updated the virtual socket server to better support our test cases.
1. Allow the virtual socket server to set transit delay for packets sent from a given IP address.
2. Ensure the ordered packet delivery for each socket (Previously the delivery order is enforced on the whole test case, so if a udp packet gets delayed based on its IP address, all TCP packets sent after the UDP packet will be delayed at least until the UDP packet is received).

BUG=webrtc:6380
R=deadbeef@webrtc.org, pthatcher@webrtc.org, skvlad@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14297}
2016-09-19 23:57:48 +00:00
Taylor Brandstetter
042041bf95 Allow the DTLS fingerprint verification to occur after the handshake.
This means the DTLS handshake can make progress while the SDP answer
containing the fingerprint is still in transit. If the signaling path
if significantly slower than the media path, this can have a moderate
impact on call setup time.

Of course, until the fingerprint is verified no media can be sent. Any
attempted write will result in SR_BLOCK.

This essentially fulfills the requirements of RFC 4572, Section 6.2:

   Note that when the offer/answer model is being used, it is possible
   for a media connection to outrace the answer back to the offerer.
   Thus, if the offerer has offered a 'setup:passive' or 'setup:actpass'
   role, it MUST (as specified in RFC 4145 [2]) begin listening for an
   incoming connection as soon as it sends its offer.  However, it MUST
   NOT assume that the data transmitted over the TLS connection is valid
   until it has received a matching fingerprint in an SDP answer.  If
   the fingerprint, once it arrives, does not match the client's
   certificate, the server endpoint MUST terminate the media connection
   with a bad_certificate error, as stated in the previous paragraph.

BUG=webrtc:6387
R=mattdr@webrtc.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14296}
2016-09-19 23:02:35 +00:00
Taylor Brandstetter
e5835f5d84 Adding an end-to-end connection time test.
The test uses a fake clock and simulates network and signaling delays in
order to get a repeatable measurement of the time to establish a
connection (including DTLS). This will help ensure that various
optimizations continue to work as expected, and no new delays are
introduced.

This CL depends on: https://codereview.webrtc.org/2140283002/

R=honghaiz@webrtc.org, pthatcher@webrtc.org, skvlad@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14270}
2016-09-16 22:07:58 +00:00
Honghai Zhang
9ecb08576e Adding logs to track potential cause of not starting port allocation.
R=deadbeef@webrtc.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14244}
2016-09-15 23:41:12 +00:00
kjellander
705ecc5dda GN: Change group deps to public_deps.
During GN vs GYP auditing it was discovered that some
GN targets that had public_configs were not exposing them
to dependents where the dependent depended on a group, which
in turn included that target as a dependency. Instead of
changing those public_configs to all_dependent_configs
(which would be a change from GYP), it's better to just change
those group targets to use public_deps instead.

BUG=webrtc:6323
NOTRY=True
TESTED=Generated GYP and GN project files on Mac and ran the
tools/gyp_flag_compare.py script before and after this patch was
applied. The file in question used for inspection was the
webrtc/api/webrtcsessiondescriptionfactory.cc
which is a part of the libjingle_peerconnection target.

Review-Url: https://codereview.webrtc.org/2344623002
Cr-Commit-Position: refs/heads/master@{#14222}
2016-09-15 07:53:34 +00:00
Honghai Zhang
d5fff5040c Removing assert error when we fail to create a connection for a ping from an unknown address.
It may happen in some legitimate scenarios.
For example a turn port may have had a refresh request timeout, so it won't create a new connection for a ping from an unknown address.

R=deadbeef@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14173}
2016-09-10 03:48:08 +00:00
Henrik Kjellander
a41c13e6a2 OWNERS: Make everyone able to change *.gn,*.gni files.
Project-wide change to make it possible for all team members
to do changes to GN files.

NOTRY=True
R=kwiberg@webrtc.org
TBR=henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14163}
2016-09-09 12:51:48 +00:00
skvlad
b9d8d10d42 Fixed flaky StunRequestTests which depended on the wall clock
StunRequestTests were using the real time clock to measure fairly large
retransmit intervals (up to several seconds). This was making the tests
slow and flaky when the system was heavily loaded.

See https://build.chromium.org/p/client.webrtc/builders/Win64%20Release/builds/9274/steps/rtc_unittests/logs/stdio
for an example of a recent failure.

This change makes the tests use a simulated clock instead. They are now
very quick, precise and reliable.

R=honghaiz@webrtc.org, zhihuang@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14097}
2016-09-07 00:18:58 +00:00
ehmaldonado
e9cc686293 GN Templates: Move common_inherited_config to the template.
Remove common_inherited_config from the targets and add it to the
template instead.

BUG=webrtc:6187
NOTRY=True

Review-Url: https://codereview.webrtc.org/2311843002
Cr-Commit-Position: refs/heads/master@{#14069}
2016-09-05 13:10:23 +00:00
ehmaldonado
7a2ce0b738 GN Templates: Move common_config to the template.
Remove common_config from the targets' config and add
it to the template instead.

BUG=webrtc:6187
NOTRY=True

Review-Url: https://codereview.webrtc.org/2300413002
Cr-Commit-Position: refs/heads/master@{#14063}
2016-09-05 08:35:48 +00:00
ehmaldonado
38a2132b02 GN: Introduce templates.
Defines the rtc_executable, rtc_source_set, rtc_test and
rtc_static_library templates.

These templates provide no functionality yet, but will enable common
configuration to be introduced, avoiding repetition in every target

Changes summary:
- Prepend rtc_ to test, source_set, executable and static_library targets
- Change "configs -= [" to "suppressed_configs += ["
- Include webrtc/build/webrtc.gni where it wasn't included yet
- Delete import("//testing/test.gni"), since rtc_test makes it unnecessary.

BUG=webrtc:6187
TBR=henrik.lundin@webrtc.org,tommi@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2301053002
Cr-Commit-Position: refs/heads/master@{#14043}
2016-09-02 11:10:41 +00:00
Per
3f9dd7c0cc Do not build stun_prober within Chrome on gn.
stun_prober does not compile on win.
https://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/79068/steps/compile%20%28with%20patch%29/logs/stdio

TBR=pthatcher@webrtc.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#14024}
2016-09-01 15:06:10 +00:00
Per
671d8008be Fix gn build of stun_prober
The common_config must be included in order for LOG to work within Chrome.

Otherwise you get compile errors... See https://codereview.chromium.org/2300923002/

TBR=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14020}
2016-09-01 12:53:47 +00:00
wjywbs
5a601d909f Fix multiple definitions of BasicPacketSocketFactory error and add stunprober in GN.
R=pthatcher@webrtc.org

Review-Url: https://codereview.webrtc.org/2289563002
Cr-Commit-Position: refs/heads/master@{#14006}
2016-08-31 21:04:00 +00:00
Honghai Zhang
4cedf2b78c Add signaling to support ICE renomination.
By default, this will tell the remote side that I am supporting ICE renomination.
It does not use ICE renomination yet even if the remote side supports it.

R=deadbeef@webrtc.org, pthatcher@webrtc.org, skvlad@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13998}
2016-08-31 15:18:22 +00:00
Taylor Brandstetter
f0bb360eca Add parameter to TransportController to not change ICE role on restart.
This will allow applications to opt in to this behavior before it's made
default.

R=skvlad@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13944}
2016-08-27 03:59:35 +00:00
zhihuang
d82eee0675 Log how often DTLS negotiation failed because of incompatible ciphersuites.
Log the DTLS handshake error code in OpenSSLStreamAdapter.
Forward the error code to WebRTCSession with the Signals.
This part is only for the WebRTC native code.
To make it work, need another CL for Chromium.

BUG=webrtc:5959

Review-Url: https://codereview.webrtc.org/2167363002
Cr-Commit-Position: refs/heads/master@{#13940}
2016-08-26 18:25:09 +00:00