ICMP error packets (Destination Unreachable, Time Exceeded) disables UdpPacketSocket::OnReadCompleted handler
Reported by
stefanpr...@gmail.com,
Apr 27 2018
|
||||||
Issue description
What steps will reproduce the problem?
1. simple case: create ICE session between hosts with same local IPs, but in different networks
1. real case: router return ICMP error packets when we try establish direct connection
What is the expected result?
established connection by p2p or relay
What do you see instead?
relay phase not work properly after errors in direct stage.
stun packets delivered to viewer and remote host application layer, but not processed.
What version of the product are you using? On what operating system? windows
Please provide any additional information below.
Attached icmp_problem.7z file contain:
1. wireshark log for problem session.
2. host side log with errors corresponding to ICMP
... ERROR:chromium_socket_factory.cc(xxx)] Received error when reading from UDP socket: -101
problem:
ICMP packet on direct phase disables UdpPacketSocket::OnReadCompleted handler.
In the next stages we can only send packets, but can not dispatch/read packets
possible fix:
...\chromium\src\remoting\protocol\chromium_socket_factory.cc
void UdpPacketSocket::OnReadCompleted(int result) {
HandleReadResult(result);
if (result >= 0) {
DoRead();
}
// Fix UDP, ICMP error packets (Destination Unreachable, Time Exceeded)
// Ignore this errors for UDP
// WSAECONNRESET: (10054) Port Unreachable
// WSAENETRESET: (10052) Related to keep-alive (TTL)
if (result == net::ERR_CONNECTION_RESET) {
//LOG(ERROR) << "===> [Error] skip, Received error when reading from UDP socket ERR_CONNECTION_RESET (re call DoRead): " << result << " , local addr:" << GetLocalAddress().ToString();
DoRead();
}
}
,
May 22 2018
,
May 22 2018
If I understand correctly: after receiving an ICMP error when trying to send packets to a private address, it renders the socket completely unusable, even when receiving packets from a different address (relay address)? Because UdpPacketSocket just stops attempting to read from the underlying socket after it gets a result < 0? Instead of just "result == net::ERR_CONNECTION_RESET", we may want to copy "IsTransientError" from here: https://cs.chromium.org/chromium/src/content/browser/renderer_host/p2p/socket_host_udp.cc?l=57&rcl=b443acd42bd4d776676f8916db70d01f2a938ff1 Which includes ERR_CONNECTION_RESET along with some errors.
,
May 22 2018
Sergey, does this make sense for us? What's the likely impact?
,
May 29 2018
Ping Sergey.
,
Jun 11 2018
Proposed fix makes sense. The P2P sockets socket layer in the browser already handles this case properly, see https://codesearch.chromium.org/chromium/src/content/browser/renderer_host/p2p/socket_host_udp.cc?l=48 . I think this logic should be copied to ChromiumSocketFactory.
,
Jun 11 2018
,
Jun 15 2018
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by phoglund@webrtc.org
, Apr 30 2018