Skip to content

Commit 241157b

Browse files
committed
Add Chromium patch required for the transform function to work
1 parent 39fedac commit 241157b

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
From 32487dcc0f70aea2d855aeb3c00db82a3a3876a6 Mon Sep 17 00:00:00 2001
2+
From: Ben Schwartz <bemasc@uproxy.org>
3+
Date: Fri, 17 Jun 2016 17:50:29 -0400
4+
Subject: [PATCH] bemasc xwalk hack: disable STUN parsing check in UDP sockets
5+
6+
---
7+
content/browser/renderer_host/p2p/socket_host_udp.cc | 7 ++++++-
8+
1 file changed, 6 insertions(+), 1 deletion(-)
9+
10+
diff --git a/content/browser/renderer_host/p2p/socket_host_udp.cc b/content/browser/renderer_host/p2p/socket_host_udp.cc
11+
index 0dbfcec..ba99964 100644
12+
--- a/content/browser/renderer_host/p2p/socket_host_udp.cc
13+
+++ b/content/browser/renderer_host/p2p/socket_host_udp.cc
14+
@@ -208,18 +208,21 @@ void P2PSocketHostUdp::HandleReadResult(int result) {
15+
std::vector<char> data(recv_buffer_->data(), recv_buffer_->data() + result);
16+
17+
if (!ContainsKey(connected_peers_, recv_address_)) {
18+
+/*
19+
P2PSocketHost::StunMessageType type;
20+
bool stun = GetStunPacketType(&*data.begin(), data.size(), &type);
21+
if ((stun && IsRequestOrResponse(type))) {
22+
+*/
23+
connected_peers_.insert(recv_address_);
24+
+/*
25+
} else if (!stun || type == STUN_DATA_INDICATION) {
26+
LOG(ERROR) << "Received unexpected data packet from "
27+
<< recv_address_.ToString()
28+
<< " before STUN binding is finished.";
29+
return;
30+
}
31+
+*/
32+
}
33+
-
34+
message_sender_->Send(new P2PMsg_OnDataReceived(
35+
id_, recv_address_, data, base::TimeTicks::Now()));
36+
37+
@@ -242,6 +245,7 @@ void P2PSocketHostUdp::Send(const net::IPEndPoint& to,
38+
}
39+
40+
if (!ContainsKey(connected_peers_, to)) {
41+
+/*
42+
P2PSocketHost::StunMessageType type = P2PSocketHost::StunMessageType();
43+
bool stun = GetStunPacketType(&*data.begin(), data.size(), &type);
44+
if (!stun || type == STUN_DATA_INDICATION) {
45+
@@ -250,6 +254,7 @@ void P2PSocketHostUdp::Send(const net::IPEndPoint& to,
46+
OnError();
47+
return;
48+
}
49+
+*/
50+
51+
if (throttler_->DropNextPacket(data.size())) {
52+
VLOG(0) << "STUN message is dropped due to high volume.";
53+
--
54+
2.8.0.rc3.226.g39d4020
55+

0 commit comments

Comments
 (0)