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}
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}
The "should I simulate EWOULDBLOCK?" determination now happens
solely in P2PTransportChannel. This also fixes a bug where the
"last packet id" was set even if no packet was sent.
R=honghaiz@webrtc.org, pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/2099783002 .
Cr-Commit-Position: refs/heads/master@{#13307}
The fake clock has a few advantages:
1. It lets use verify that operations take the expected number of
round trips.
2. It makes the tests faster by letting us remove the equivalent
of "Sleep(500)" all over the tests.
3. It makes the tests less flaky, because sometimes sleeping for
500ms or waiting for 1s is not enough.
R=honghaiz@webrtc.org, pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/2097793003 .
Cr-Commit-Position: refs/heads/master@{#13304}
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}
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}
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}
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}
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}
AllocationSequence is responsible for receiving incoming packets on
a shared UDP socket and passing them to the Port objects. TurnPort
may stop sharing UDP socket in which case it allocates a new socket.
AllocationSequence::OnReadPacket() wasn't handling that case properly
which was causing an assert in TurnPort::OnReadPacket().
BUG=webrtc:5757
R=honghaiz@webrtc.org, jiayl@chromium.org, pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/1871693004 .
Cr-Commit-Position: refs/heads/master@{#12675}
But keep #including scoped_ptr.h in .h files, so as not to break
WebRTC users who expect those .h files to give them rtc::scoped_ptr.
BUG=webrtc:5520
Review URL: https://codereview.webrtc.org/1923163003
Cr-Commit-Position: refs/heads/master@{#12532}
Also changed from unsigned to signed integer per the style guide.
By the way, I kept all delta-times to be 32-bit int.
The only things left in the p2p dir are
1. proberprober/main.cc where Time() is used as the input for a random number.
2. pseudotcp.cc: where 32-bit time info is sent over the wire.
BUG=webrtc:5636
Review URL: https://codereview.webrtc.org/1793553002
Cr-Commit-Position: refs/heads/master@{#12019}
Multiple sources with the same names forces ugly GYP hacks in
Chromium's libjingle.gyp. Rename the sources in WebRTC to
enable cleaning this up in Chromium.
To summarize:
webrtc/media/base/constants.{cc,h} -> mediaconstants.{cc,h}
webrtc/p2p/base/constants.{cc,h} -> p2pconstants.{cc,h}
This CL will require coordinating landing a roll in Chromium.
BUG=webrtc:4256
NOTRY=True
Review URL: https://codereview.webrtc.org/1750593002
Cr-Commit-Position: refs/heads/master@{#11842}
For example, when the TURN port has an ALLOCATE_MISMATCH error.
BUG=webrtc:5432
Review URL: https://codereview.webrtc.org/1595613004
Cr-Commit-Position: refs/heads/master@{#11453}
If it still handle packets, when a ping arrives, it will pass the packet to p2ptransportchannel, eventually causing an ASSERT error there (when p2ptransportchannel tries to create a connection from the ping request from unknown address).
BUG=
Review URL: https://codereview.webrtc.org/1649493006
Cr-Commit-Position: refs/heads/master@{#11430}
This fixes an assert error in Turnport::OnSendStunPacket
BUG=webrtc:5388
Review URL: https://codereview.webrtc.org/1547373002
Cr-Commit-Position: refs/heads/master@{#11152}
This means that if a TURN server denies permission for an
unreachable address, we'll no longer ping it fruitlessly.
BUG=webrtc:4917
Review URL: https://codereview.webrtc.org/1415313004
Cr-Commit-Position: refs/heads/master@{#10789}
Do not delete the turn port entry right away when the respective
connection is deleted. The dependency on asyncinvoker has been added
in chromium libjingle-nacl.
BUG=webrtc:5120
Review URL: https://codereview.webrtc.org/1450263002
Cr-Commit-Position: refs/heads/master@{#10679}
Reason for revert:
I have to revert this unfortunately because it adds a dependency on AsyncInvoker, which is not included when building libjingle_nacl in Chromium.
AsyncInvoker needs to first be added to the list of sources in Chromium.
Original issue's description:
> Do not delete the turn port entry right away when the respective connection is deleted.
> BUG=webrtc:5120
>
> Committed: https://crrev.com/e58fe8ef0e6d959f54adee3ed77764927d3845cc
> Cr-Commit-Position: refs/heads/master@{#10641}
TBR=pthatcher@webrtc.org,honghaiz@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5120
Review URL: https://codereview.webrtc.org/1449863002
Cr-Commit-Position: refs/heads/master@{#10649}
Reason for revert:
Broke the Windows build:
[226/365] LINK_EMBED cc_perftests.exe
FAILED: ninja -t msvc -e environment.x86 -- E:\b\build\goma/gomacc "E:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\remoting\protocol\remoting_unittests.channel_socket_adapter_unittest.obj.rsp /c ..\..\remoting\protocol\channel_socket_adapter_unittest.cc /Foobj\remoting\protocol\remoting_unittests.channel_socket_adapter_unittest.obj /Fdobj\remoting\remoting_unittests.cc.pdb
e:\b\build\slave\win\build\src\remoting\protocol\channel_socket_adapter_unittest.cc(36) : error C3861: 'set_readable': identifier not found
ninja: build stopped: subcommand failed.
Original issue's description:
> Replace readable with receiving where receiving means receiving anything (stun ping, response or data packet).
> If a connection does not receive for 30 seconds, it will be deleted.
> BUG=
>
> Committed: https://crrev.com/ae16f8547d3b447f62f6660f13688585c6c3de15
> Cr-Commit-Position: refs/heads/master@{#10001}
TBR=pthatcher@webrtc.org,honghaiz@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=
Review URL: https://codereview.webrtc.org/1356103002
Cr-Commit-Position: refs/heads/master@{#10002}
If a connection does not receive for 30 seconds, it will be deleted.
BUG=
Review URL: https://codereview.webrtc.org/1351673003
Cr-Commit-Position: refs/heads/master@{#10001}
This test only currently works because stun.l.google.com has an IPv4
address and the TURN port is created with an IPv6 address. But the test
would start failing if/when it starts providing an IPv6 address. Which
may already be happening, as indicated by a recent test failure.
Review URL: https://codereview.webrtc.org/1290233003
Cr-Commit-Position: refs/heads/master@{#9841}
Migrated from https://codereview.webrtc.org/1275703006/ which causes test failures for android. On android, loopback interface was used as local interface to generate candidates. Add a test case to make sure this won't be broken in the future.
Also observed some failures under content_browsertests in chromium.fyi bot but can't repro locally. Might just be temporary test issue.
BUG=webrtc:4517
TBR=pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/1299333003 .
Cr-Commit-Position: refs/heads/master@{#9746}
The IceEndpointType has the format of <local_endpoint>_<remote_endpoint>. It is recorded on the BestConnection when we have the first OnTransportCompleted signaled.
BUG=webrtc:4918
R=pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/1277263002 .
Cr-Commit-Position: refs/heads/master@{#9737}
This reverts commit 0a2955f227666efd87b2a303a69c083ef801c528.
Revert "In the past, P2PPortAllocator.enable_multiple_routes is the indicator whether we should bind to the any address. It's easy to translate that into a port allocator flag in P2PPortAllocator's ctor. Going forward, we have to depend on an asynchronous permission check to determine whether gathering local address is allowed or not, hence the current way of passing it through constructor approach won't work any more. The asynchronous check will trigger SignalNetowrksChanged so we could only check that inside DoAllocate."
This reverts commit ba9ab4cd8d2e8fbc068dc36b5e6f6331d7deeccf.
TBR=pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/1288843003 .
Cr-Commit-Position: refs/heads/master@{#9729}
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}
And add a constructor for creating an uninitialized Buffer of a
specified size.
(I intend to follow up with more Buffer changes, but since it's rather
widely used, the rename is quite noisy and works better as a separate
CL.)
R=tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/48579004
Cr-Commit-Position: refs/heads/master@{#8841}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8841 4adac7df-926f-26a2-2b94-8c16560cd09d
Failed on Linux_Memcheck bot.
http://chromegw/i/client.webrtc/builders/Linux%20Memcheck/builds/3182
> VirtualSocketServer out-of-order issue with closing TCP sockets
>
> https://webrtc-codereview.appspot.com/41449004 added a TURN TCP
> allocation release test which was disabled as it triggered an assert
> in the turnserver.
>
> This was caused by VirtualSockerServer delivering the last TCP packet
> after closing the connection. Calling
> VirtualSocketServer::SendTcp
> and
> VirtualSocket::Close
> from TestTurnTCPReleaseAllocation led to the following order of
> messages in VirtualSocket::OnMessage:
> MSG_ID_DISCONNECT
> MSG_ID_PACKET
>
> This is out of order and triggers an assert in turnserver.cc since the
> socket from which the message arrives has already been discarded,
> subsequently breaking the test.
>
> In VirtualSocketServer::Disconnect the MSG_ID_DISCONNECT is posted to the
> msg_queue immediately, thus getting ahead of any (slightly delayed)
> actual packets.
>
> Maybe PostAt(network_delay_ + 1, ...) would be better?
>
> Re-enables TestTurnTCPReleaseAllocation.
>
> BUG=
> R=juberti@webrtc.org
>
> Review URL: https://webrtc-codereview.appspot.com/34759004TBR=pthatcher@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/38979004
Cr-Commit-Position: refs/heads/master@{#8280}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8280 4adac7df-926f-26a2-2b94-8c16560cd09d
https://webrtc-codereview.appspot.com/41449004 added a TURN TCP
allocation release test which was disabled as it triggered an assert
in the turnserver.
This was caused by VirtualSockerServer delivering the last TCP packet
after closing the connection. Calling
VirtualSocketServer::SendTcp
and
VirtualSocket::Close
from TestTurnTCPReleaseAllocation led to the following order of
messages in VirtualSocket::OnMessage:
MSG_ID_DISCONNECT
MSG_ID_PACKET
This is out of order and triggers an assert in turnserver.cc since the
socket from which the message arrives has already been discarded,
subsequently breaking the test.
In VirtualSocketServer::Disconnect the MSG_ID_DISCONNECT is posted to the
msg_queue immediately, thus getting ahead of any (slightly delayed)
actual packets.
Maybe PostAt(network_delay_ + 1, ...) would be better?
Re-enables TestTurnTCPReleaseAllocation.
BUG=
R=juberti@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/34759004
Cr-Commit-Position: refs/heads/master@{#8271}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8271 4adac7df-926f-26a2-2b94-8c16560cd09d