471 Commits

Author SHA1 Message Date
Honghai Zhang
572b094128 Do not switch best connection on the controlled side too frequently due to the nomination from the controlling side.
We now use a single rule to determine connection switch on the controlled side. The rule is to select the new best connection based on the following order:
1. writable/receiving/connected state.
2. nominated
3. last time receiving data packet.
4. priority.
5. latency (rtt)

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

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

Cr-Commit-Position: refs/heads/master@{#13274}
2016-06-23 19:38:37 +00:00
Honghai Zhang
f4ae6dc763 Fix an issue in IPv6 support.
When creating connections on turn port, check whether the local and remote candidates have the same IP address family, instead of checking the address family of the local socket against the remote candidate.

BUG=5871
R=deadbeef@webrtc.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13269}
2016-06-23 05:35:06 +00:00
deadbeef
14f97f5bc6 Adding IceConfig option to assume TURN/TURN candidate pairs will work.
This will allow media to be sent on these pairs before a binding
response is received, shortening call setup time. However, this is only
possible if the TURN servers don't require CreatePermission when
communicating with each other.

R=honghaiz@webrtc.org, pthatcher@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2063823008
Cr-Commit-Position: refs/heads/master@{#13268}
2016-06-23 00:14:20 +00:00
honghaiz
079a7a197f Reland of Do not delete a connection in the turn port with permission error or refresh error. (patchset #1 id:1 of https://codereview.webrtc.org/2090833002/ )
Reason for revert:
The Webrtc waterfall indicates that this revert is not necessary.

Original issue's description:
> Revert of Do not delete a connection in the turn port with permission error or refresh error. (patchset #6 id:260001 of https://codereview.webrtc.org/2068263003/ )
>
> Reason for revert:
> It broke webrtc builds.
>
> Original issue's description:
> > Do not delete a connection in the turn port with permission error,  refresh error, or binding error.
> >
> > Even if those error happened, the connection may still be able to receive packets for a while.
> > If we delete the connections, all packets arriving will be dropped.
> >
> > BUG=webrtc:6007
> > R=deadbeef@webrtc.org, pthatcher@webrtc.org
> >
> > Committed: https://crrev.com/3d77deb29c15bfb8f794ef3413837a0ec0f0c131
> > Cr-Commit-Position: refs/heads/master@{#13262}
>
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> TBR=pthatcher@webrtc.org,deadbeef@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:6007
>
> Committed: https://crrev.com/3159ffae6b1d5cba2ad972bd3d8074ac85f2c7f9
> Cr-Commit-Position: refs/heads/master@{#13265}

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

Review-Url: https://codereview.webrtc.org/2090073003
Cr-Commit-Position: refs/heads/master@{#13266}
2016-06-22 23:27:08 +00:00
honghaiz
3159ffae6b Revert of Do not delete a connection in the turn port with permission error or refresh error. (patchset #6 id:260001 of https://codereview.webrtc.org/2068263003/ )
Reason for revert:
It broke webrtc builds.

Original issue's description:
> Do not delete a connection in the turn port with permission error,  refresh error, or binding error.
>
> Even if those error happened, the connection may still be able to receive packets for a while.
> If we delete the connections, all packets arriving will be dropped.
>
> BUG=webrtc:6007
> R=deadbeef@webrtc.org, pthatcher@webrtc.org
>
> Committed: https://crrev.com/3d77deb29c15bfb8f794ef3413837a0ec0f0c131
> Cr-Commit-Position: refs/heads/master@{#13262}

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=pthatcher@webrtc.org,deadbeef@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:6007

Review-Url: https://codereview.webrtc.org/2090833002
Cr-Commit-Position: refs/heads/master@{#13265}
2016-06-22 23:18:37 +00:00
honghaiz
13d5db3857 Revert of Adding IceConfig option to assume TURN/TURN candidate pairs will work. (patchset #9 id:160001 of https://codereview.webrtc.org/2063823008/ )
Reason for revert:
Breaking webrtc builder.

Original issue's description:
> Adding IceConfig option to assume TURN/TURN candidate pairs will work.
>
> This will allow media to be sent on these pairs before a binding
> response is received, shortening call setup time. However, this is only
> possible if the TURN servers don't require CreatePermission when
> communicating with each other.
>
> R=honghaiz@webrtc.org, pthatcher@webrtc.org
>
> Committed: https://crrev.com/8e6134eae4117a239de67c9a9dae8f5e3235d803
> Cr-Commit-Position: refs/heads/master@{#13263}
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=pthatcher@webrtc.org,deadbeef@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.

Review-Url: https://codereview.webrtc.org/2090823002
Cr-Commit-Position: refs/heads/master@{#13264}
2016-06-22 23:15:13 +00:00
Taylor Brandstetter
8e6134eae4 Adding IceConfig option to assume TURN/TURN candidate pairs will work.
This will allow media to be sent on these pairs before a binding
response is received, shortening call setup time. However, this is only
possible if the TURN servers don't require CreatePermission when
communicating with each other.

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

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

Cr-Commit-Position: refs/heads/master@{#13263}
2016-06-22 23:01:56 +00:00
Honghai Zhang
3d77deb29c Do not delete a connection in the turn port with permission error, refresh error, or binding error.
Even if those error happened, the connection may still be able to receive packets for a while.
If we delete the connections, all packets arriving will be dropped.

BUG=webrtc:6007
R=deadbeef@webrtc.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13262}
2016-06-22 23:01:55 +00:00
Taylor Brandstetter
f7c15a9159 Set the generation on peer reflexive candidates when created.
If an actual peer reflexive candidate was created (and not one that
would just be replaced by a different candidate later), we weren't
setting the generation value. This means that new-generation prflx
candidate pairs weren't being prioritized above the cross-generation
pairs, or above relay<->relay pairs.

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

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

Cr-Commit-Position: refs/heads/master@{#13259}
2016-06-22 20:14:18 +00:00
deadbeef
dfc4244d9e Update ICE role on all ports, not just ones used for new connections.
Previously, if the ICE role changed, SetIceRole was only called on
the ports from the most recent ICE generation. However, STUN pings
may still be sent and received by older generation ports, so they
should receive an updated role as well.

This was previously triggering an ASSERT, because a P2PTransportChannel
expects the ICE role of each of its ports to match its own role.

Committed: https://crrev.com/370544594e18deb7f560f961295c8cf3f0a679f1
Review-Url: https://codereview.webrtc.org/2053043003
Cr-Original-Commit-Position: refs/heads/master@{#13226}
Cr-Commit-Position: refs/heads/master@{#13247}
2016-06-21 21:19:55 +00:00
deadbeef
0af180b1ae When a remote candidate is added, update all prflx candidates.
Previously they were only being updated for connections using the
most current "generation" of ports. This results in the older-
generation prflx candidate pair being prioritized above newer-
generation candidate pairs.

Review-Url: https://codereview.webrtc.org/2087713002
Cr-Commit-Position: refs/heads/master@{#13245}
2016-06-21 20:15:36 +00:00
zhihuang
435264a183 Increase the stun ping interval.
Writable connections are pinged at a slower rate.
The function IsPingable will filter out the writable connections.
The interval for slower ping rate by default is WRITABLE_CONNECTION_PING_INTERVAL(2500ms) and can be set with the configuration.

BUG=webrtc:1161

Committed: https://crrev.com/8f7a5aad55a64f0d81b6436a22ffbdfcdcde91e0
Review-Url: https://codereview.webrtc.org/1944003002
Cr-Original-Commit-Position: refs/heads/master@{#12736}
Cr-Commit-Position: refs/heads/master@{#13241}
2016-06-21 18:28:49 +00:00
phoglund
8d2248ff30 Revert of Update ICE role on all ports, not just ones used for new connections. (patchset #3 id:40001 of https://codereview.webrtc.org/2053043003/ )
Reason for revert:
Speculative revert: breaks video quality tests on Win and Mac (???): https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Tester/builds/31209

Original issue's description:
> Update ICE role on all ports, not just ones used for new connections.
>
> Previously, if the ICE role changed, SetIceRole was only called on
> the ports from the most recent ICE generation. However, STUN pings
> may still be sent and received by older generation ports, so they
> should receive an updated role as well.
>
> This was previously triggering an ASSERT, because a P2PTransportChannel
> expects the ICE role of each of its ports to match its own role.
>
> Committed: https://crrev.com/370544594e18deb7f560f961295c8cf3f0a679f1
> Cr-Commit-Position: refs/heads/master@{#13226}

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

Review-Url: https://codereview.webrtc.org/2078423004
Cr-Commit-Position: refs/heads/master@{#13240}
2016-06-21 15:29:29 +00:00
henrik.lundin
c3a34ed544 Disable P2PTransportChannelTest.TestIceConfigWillPassDownToPort
Because it is flaky on Windows.

BUG=webrtc:6019
TBR=pthatcher@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2086823002
Cr-Commit-Position: refs/heads/master@{#13232}
2016-06-21 09:21:17 +00:00
deadbeef
370544594e Update ICE role on all ports, not just ones used for new connections.
Previously, if the ICE role changed, SetIceRole was only called on
the ports from the most recent ICE generation. However, STUN pings
may still be sent and received by older generation ports, so they
should receive an updated role as well.

This was previously triggering an ASSERT, because a P2PTransportChannel
expects the ICE role of each of its ports to match its own role.

Review-Url: https://codereview.webrtc.org/2053043003
Cr-Commit-Position: refs/heads/master@{#13226}
2016-06-20 19:55:59 +00:00
katrielc
1a20610764 Fix buffer overflow in HMAC validation of STUN messages.
Review-Url: https://codereview.webrtc.org/2071873002
Cr-Commit-Position: refs/heads/master@{#13215}
2016-06-20 12:13:22 +00:00
kjellander
5023d41cb4 GN: Update xmpp and p2p to match Chromium build
Manual review shows that several more sources should be excluded for the
Chromium build. This is likely what's blocking
https://codereview.chromium.org/2022833002/

It was also discovered that the following were missing from GYP+GN:
webrtc/p2p/base/dtlstransport.h
webrtc/p2p/base/session.cc
webrtc/p2p/base/session.h

BUG=webrtc:4256
TBR=pthatcher@webrtc.org
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2077883002
Cr-Commit-Position: refs/heads/master@{#13200}
2016-06-18 11:23:08 +00:00
sergeyu
d1523ca38f Fix header size check in PseudoTcp::parse().
BUG=chromium:620694
TBR=pbos@webrtc.org

Review-Url: https://codereview.webrtc.org/2073963002
Cr-Commit-Position: refs/heads/master@{#13177}
2016-06-17 01:08:19 +00:00
Taylor Brandstetter
4f0dfbd213 Change initial DTLS retransmission timer from 1 second to 50ms.
This will help ensure a timely DTLS handshake when there's packet
loss. It will likely result in spurious retransmissions (since the
RTT is usually > 50ms), but since exponential backoff is still used,
there will at most be ~4 extra retransmissions. For a time-sensitive
application like WebRTC this seems like a reasonable tradeoff.

R=pthatcher@webrtc.org, juberti@chromium.org, juberti@webrtc.org

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

Committed: https://crrev.com/1e435628366fb9fed71632369f05928ed857d8ef
Cr-Original-Commit-Position: refs/heads/master@{#12853}
Cr-Commit-Position: refs/heads/master@{#13159}
2016-06-16 00:15:35 +00:00
nisse
7336225505 Delete left-over files.
References from Chrome's build files are gone with
https://codereview.chromium.org/2054763002/ and
https://codereview.chromium.org/2056243003/

BUG=

Review-Url: https://codereview.webrtc.org/2063703002
Cr-Commit-Position: refs/heads/master@{#13123}
2016-06-14 08:54:52 +00:00
Taylor Brandstetter
5d97a9a05b Adding more detail to MessageQueue::Dispatch logging.
Every message will now be traced with the location from which it was
posted, including function name, file and line number.

This CL also writes a normal LOG message when the dispatch took more
than a certain amount of time (currently 50ms).

This logging should help us identify messages that are taking
longer than expected to be dispatched.

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

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

Cr-Commit-Position: refs/heads/master@{#13104}
2016-06-10 21:17:33 +00:00
katrielc
e4bda24376 Before validating a STUN packet, check it's big enough for a header.
Otherwise, we'll read out of bounds if the packet is too small.

NOTRY=true

Review-Url: https://codereview.webrtc.org/2040953003
Cr-Commit-Position: refs/heads/master@{#13093}
2016-06-09 15:45:52 +00:00
deadbeef
73fbcf9237 Don't re-determine ICE role on an ICE restart.
This only causes an increased likelihood of role conflicts as each peer
is picking a new role. It also means that if ICE is restarted for only
one media stream, roles can be different across media streams (which isn't
even allowed).

For more explanation of why this is unnecessary and should be changed,
see this discussion:
https://mailarchive.ietf.org/arch/msg/ice/C0_QRCTNcwtvUF12y28jQicPR10

Review-Url: https://codereview.webrtc.org/2046123003
Cr-Commit-Position: refs/heads/master@{#13077}
2016-06-08 20:13:06 +00:00
kjellander
c76dc95daf Reland of GN: Add BUILD.gn files for webrtc/{api,media,libjingle,p2p,pc}
The only thing that differs from the previous attempt in
https://codereview.webrtc.org/1979933002/ is that none of
the new targets are not hooked up to the webrtc target in
webrtc/BUILD.gn, which should make it not break the
chromium.webrtc.fyi bots.

Add BUILD.gn files for webrtc/{api,media,libjingle,p2p,pc} in
preparation for removing src/third_party/libjingle in Chromium.

Changes between previous attempt and the one before that
(https://codereview.webrtc.org/1973313002) are:
* Added libstunprober target
* Adjusted warnings for Chromium's clang plugins
* webrtc/pc/externalhmac.{h,cc} added for Chromium builds.

BUG=webrtc:4256
NOTRY=True
NOPRESUBMIT=True
TBR=perkj@webrtc.org, tommi@webrtc.org

Review-Url: https://codereview.webrtc.org/2037983002
Cr-Commit-Position: refs/heads/master@{#13030}
2016-06-03 10:09:40 +00:00
kjellander
26306b139a Remove test targets of type none.
Move the sources of rtc_unittests and xmllite_xmpp_unittests
into the actual targets instead of depending on none-targets.
This will make it easier to create GN targets matching them.

BUG=webrtc:5949
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2029583002
Cr-Commit-Position: refs/heads/master@{#13008}
2016-06-02 09:26:10 +00:00
honghaiz
18f9da0286 Fix a memory issue when calling LOG_J in port.cc
The connection delete  message may be processed when a port is being deleted.
Calling LOG_J here needs to access the port object that may have been partially released.
This fixes the memcheck bot failure.

TBR=pthatcher@webrtc.org

BUG=

Review-Url: https://codereview.webrtc.org/2026403003
Cr-Commit-Position: refs/heads/master@{#13002}
2016-06-02 06:53:09 +00:00
zhihuang
5ecf16c072 Add Stats to Stun ping.
Add sent_ping_requests, recv_ping_responses to ConnectionInfo.
recv_ping_responses_ will be incremented when OnConnectionRequestResponse() is called.
ent_ping_requests_ will be incremented when OnConnectionRequestSent() is called.

BUG=webrtc:5695

Review-Url: https://codereview.webrtc.org/1940493002
Cr-Commit-Position: refs/heads/master@{#13001}
2016-06-02 00:09:24 +00:00
honghaiz
36f50e8e4e Create a new connection if a candidate reuses an address
If the remote side sends a candidate with the same address and port with an existing candidate,
but with a new ufrag and pwd, the local client will create a new connection from it
and destroy the old connection with the same remote address.

BUG=webrtc:5915

Review-Url: https://codereview.webrtc.org/2018693002
Cr-Commit-Position: refs/heads/master@{#13000}
2016-06-01 22:57:12 +00:00
Taylor Brandstetter
b787d87504 Making FakePortAllocator support IPv6.
FakePortAllocator is used with both virtual sockets and real sockets.
Thus it needs to work on a system with no IPv4 interface.

R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12995}
2016-06-01 17:43:22 +00:00
kjellander
4d167e5ccd Revert of GN: Add BUILD.gn files for webrtc/{api,media,libjingle,p2p,pc} (patchset #5 id:80001 of https://codereview.webrtc.org/1979933002/ )
Reason for revert:
Too many errors to address showed up when trying to land this with Chromium changes in https://codereview.chromium.org/2022833002/.
Will address them separately before relanding.

Original issue's description:
> Reland of GN: Add BUILD.gn files for webrtc/{api,media,libjingle,p2p,pc}
>
> Add BUILD.gn files for webrtc/{api,media,libjingle,p2p,pc} in
> preparation for removing src/third_party/libjingle in Chromium.
>
> Changes from previous attempt:
> * Added libstunprober target
> * Adjusted warnings for Chromium's clang plugins
> * webrtc/pc/externalhmac.{h,cc} added for Chromium builds.
>
> As soon this has landed a roll including the changes in
> https://codereview.chromium.org/2022833002/ is needed to make
> Chromium build cleanly.
>
> BUG=webrtc:4256
> NOTRY=True
> NOPRESUBMIT=True
>
> Committed: https://crrev.com/164e978f981c7810c4260c4184f41e26bae90230
> Cr-Commit-Position: refs/heads/master@{#12983}

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

Review-Url: https://codereview.webrtc.org/2023233002
Cr-Commit-Position: refs/heads/master@{#12988}
2016-06-01 11:45:13 +00:00
kjellander
164e978f98 Reland of GN: Add BUILD.gn files for webrtc/{api,media,libjingle,p2p,pc}
Add BUILD.gn files for webrtc/{api,media,libjingle,p2p,pc} in
preparation for removing src/third_party/libjingle in Chromium.

Changes from previous attempt:
* Added libstunprober target
* Adjusted warnings for Chromium's clang plugins
* webrtc/pc/externalhmac.{h,cc} added for Chromium builds.

As soon this has landed a roll including the changes in
https://codereview.chromium.org/2022833002/ is needed to make
Chromium build cleanly.

BUG=webrtc:4256
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/1979933002
Cr-Commit-Position: refs/heads/master@{#12983}
2016-06-01 09:17:56 +00:00
honghaiz
603470576e Add a flag to filter out high-cost networks.
This allows webrtc to not gather on cellular networks if wifi or
other low cost networks are present.
BUG=

Review-Url: https://codereview.webrtc.org/1987833002
Cr-Commit-Position: refs/heads/master@{#12979}
2016-06-01 01:29:18 +00:00
deadbeef
8271a7f6d7 Increasing a timeout for TestGetAllPortsNoUdpAllowed.
The timeout was 3 seconds, but on one bot (TSan) it took 4.3 seconds.

NOTRY=True
TBR=pthatcher@webrtc.org

Review-Url: https://codereview.webrtc.org/2021413002
Cr-Commit-Position: refs/heads/master@{#12978}
2016-05-31 23:27:15 +00:00
deadbeef
1c20610ede Handle any number of role conflicts; not just the first.
I think the code that only allowed one role conflict was a workaround
for our old implementation (TransportChannelProxy, etc.). Not necessary
now, with TransportController.

BUG=webrtc:5470

Review-Url: https://codereview.webrtc.org/2004463003
Cr-Commit-Position: refs/heads/master@{#12949}
2016-05-27 20:34:45 +00:00
Taylor Brandstetter
6aefc6307d Move the ICE state transition ASSERTS to a lower level.
They don't really belong in PeerConnection because the state at that
level can change when a transport channel is removed. That makes almost
any state transition possible.

The asserts are now in P2PTransportChannel (the equivalent to
IceTransport in the spec). Currently it has a reduced set of states,
that don't even take into account writability, but I plan to change
that soon.

BUG=webrtc:4757
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12937}
2016-05-26 23:08:31 +00:00
Taylor Brandstetter
8c9be5e490 In BasicPortAllocator test, don't require a specific candidate order.
The test doesn't really care about the order; the fact that it relied
on a specific order was just an implementation detail.

However, this made the test flaky since race conditions sometimes
determine the order. It also made it frustrating to add new tests.

BUG=webrtc:5930
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12936}
2016-05-26 23:07:39 +00:00
Taylor Brandstetter
7e1b8fbb45 Increasing "converge" time for remote candidate pair selection in test.
The local endpoint was given 4 seconds to converge but the remote
endpoint was only given 1 second. Now they both collectively
have 4 seconds.

Also fixed the ExpectCandidate2 method (used for verbose failure
logging) and removed a bunch of dead code.

TBR=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12934}
2016-05-26 22:21:56 +00:00
deadbeef
4c2db414be Increasing STUN timeout for some more tests.
A 500ms margin of error from STUN timeout to test timeout is not
enough for some buildbots.

TBR=pthatcher@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2015763004
Cr-Commit-Position: refs/heads/master@{#12932}
2016-05-26 21:34:18 +00:00
Taylor Brandstetter
5ef034af93 Changing STUN request log message to "verbose".
TBR=pthatcher@webrtc.org
NOTRY=True

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

Cr-Commit-Position: refs/heads/master@{#12901}
2016-05-26 00:20:45 +00:00
honghaiz
524ecc29dd Ping connections with the fast rate until each connection is pinged at least three times,
or the connection times out or is pruned.

BUG=webrtc:5927

Review-Url: https://codereview.webrtc.org/2009763002
Cr-Commit-Position: refs/heads/master@{#12899}
2016-05-25 19:48:36 +00:00
philipel
834081aadf Disabled BasicPortAllocatorTest.TestDisableUdpTurn (flaky)
TBR=mflodman@webrtc.org

BUG=webrtc:5929

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

Cr-Commit-Position: refs/heads/master@{#12886}
2016-05-25 09:13:03 +00:00
Honghai Zhang
1590c3937c Fire a signal when the transport channel state changes
This fixes an issue that sometimes the transport channel state changes but
the transportcontroller is not notified.

BUG=5907
R=deadbeef@webrtc.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12880}
2016-05-24 20:15:14 +00:00
tommi
1b32acdbd0 Remove unused libjingle_xmpphelp target.
NOTRY=true

Review-Url: https://codereview.webrtc.org/2011503002
Cr-Commit-Position: refs/heads/master@{#12877}
2016-05-24 18:33:39 +00:00
zhihuang
6d0d4bf31d Change the size of the ICE ufrag to 4 bytes.
This is the minumum allowed size, and will allow STUN pings to be smaller.
The unit tests on the the Gturn are also modified. A username with length of 16 bytes will be generated for Gturn only.

Review-Url: https://codereview.webrtc.org/1848083002
Cr-Commit-Position: refs/heads/master@{#12876}
2016-05-24 17:13:41 +00:00
Taylor Brandstetter
417eebe5dd Fixing the behavior of the candidate filter with pooled candidates.
According to JSEP, the candidate filter does not affect pooled
candidates because they can be filtered once they're ready to be
surfaced to the application.

So, pooled port allocator sessions will use a filter of CF_ALL, with a
new filter applied when the session is taken by a P2PTransportChannel.

When the filter is applied:
* Some candidates may no longer be returned by ReadyCandidates()
* Some candidates may no longer have a "related address" (for privacy)
* Some ports may no longer be returned by ReadyPorts()

To simplify this, the candidate filtering logic is now moved up from
the Ports to the BasicPortAllocator, with some helper methods to perform
the filtering and stripping out of data.

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

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

Cr-Commit-Position: refs/heads/master@{#12856}
2016-05-23 23:02:29 +00:00
Taylor Brandstetter
8fcf414846 Attempting to fix flaky tests that deal with STUN timeout.
The STUN timeout is 9500ms, and the tests are waiting for 10000ms.

The 500ms margin of error is not enough for some bots (such as UBSan).

R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12854}
2016-05-23 19:49:35 +00:00
Taylor Brandstetter
54f1d9bafd Removing PORTALLOCATOR_ENABLE_SHAKER.
It's not used by anything, and is obsoleted by connection pruning,
candidate pruning, timeouts, etc.

R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12834}
2016-05-20 22:38:00 +00:00
Honghai Zhang
351d77b702 Update the type and cost of existing networks
if the network monitor detects it after the native code does.

Also set the network cost for ethernet, wifi, unknown, cellular network type to be 0, 10, 50, 900,
so that unknown networks will have lower precedence than known networks with low cost (like Wifi) but  higher precedence than known networks with high cost.

And third, infer network type based on limited name matching in Android if there is no network monitor or network monitor did not find the type.

BUG=webrtc:5890
R=pthatcher@chromium.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12833}
2016-05-20 22:08:37 +00:00
Taylor Brandstetter
2abe427417 Revert of Increase the stun ping interval. (patchset #5 id:80001 of https://codereview.webrtc.org/1944003002/ )
Reason for revert:
This will take longer time for the RTT to converge.
Need to update the RTT calculation algorithm if doing this.

Original issue's description:
> Increase the stun ping interval.
>
> Writable connections are pinged at a slower rate.
> The function IsPingable will filter out the writable connections.
> The interval for slower ping rate by default is WRITABLE_CONNECTION_PING_INTERVAL(2500ms) and can be set with the configuration.
>
> BUG=webrtc:1161
>
> Committed: https://crrev.com/8f7a5aad55a64f0d81b6436a22ffbdfcdcde91e0
> Cr-Commit-Position: refs/heads/master@{#12736}

TBR=honghaiz@webrtc.org,pthatcher@webrtc.org,zhihuang@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:1161

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

Cr-Commit-Position: refs/heads/master@{#12762}
2016-05-16 21:12:22 +00:00
kwiberg
fd8be3468a Remove webrtc/base/scoped_ptr.h
This is a re-land of https://codereview.webrtc.org/1942823002

TBR=tommi@webrtc.org
BUG=webrtc:5520

Review-Url: https://codereview.webrtc.org/1966423002
Cr-Commit-Position: refs/heads/master@{#12750}
2016-05-15 02:44:18 +00:00