Index: content/browser/renderer_host/p2p/socket_host_tcp.cc |
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp.cc b/content/browser/renderer_host/p2p/socket_host_tcp.cc |
index 007472c07ee6ee44b0daed0049e7c0da4f365944..2933d3917022a4c2d0564e5a003f5c8c580e0a92 100644 |
--- a/content/browser/renderer_host/p2p/socket_host_tcp.cc |
+++ b/content/browser/renderer_host/p2p/socket_host_tcp.cc |
@@ -18,6 +18,7 @@ |
#include "net/socket/tcp_client_socket.h" |
#include "net/url_request/url_request_context.h" |
#include "net/url_request/url_request_context_getter.h" |
+#include "third_party/libjingle/source/talk/base/asyncpacketsocket.h" |
namespace { |
@@ -315,7 +316,7 @@ void P2PSocketHostTcpBase::Send(const net::IPEndPoint& to, |
} |
} |
- DoSend(to, data); |
+ DoSend(to, data, options); |
} |
void P2PSocketHostTcpBase::WriteOrQueue( |
@@ -447,13 +448,17 @@ int P2PSocketHostTcp::ProcessInput(char* input, int input_len) { |
} |
void P2PSocketHostTcp::DoSend(const net::IPEndPoint& to, |
- const std::vector<char>& data) { |
+ const std::vector<char>& data, |
+ const talk_base::PacketOptions& options) { |
int size = kPacketHeaderSize + data.size(); |
scoped_refptr<net::DrainableIOBuffer> buffer = |
new net::DrainableIOBuffer(new net::IOBuffer(size), size); |
*reinterpret_cast<uint16*>(buffer->data()) = base::HostToNet16(data.size()); |
memcpy(buffer->data() + kPacketHeaderSize, &data[0], data.size()); |
+ packet_processing_helpers::MaybeUpdatePacketAbsSendTimeExtnAndRtpAuthTag( |
+ buffer->data(), buffer->BytesRemaining(), options); |
+ |
WriteOrQueue(buffer); |
} |
@@ -492,7 +497,8 @@ int P2PSocketHostStunTcp::ProcessInput(char* input, int input_len) { |
} |
void P2PSocketHostStunTcp::DoSend(const net::IPEndPoint& to, |
- const std::vector<char>& data) { |
+ const std::vector<char>& data, |
+ const talk_base::PacketOptions& options) { |
// Each packet is expected to have header (STUN/TURN ChannelData), where |
// header contains message type and and length of message. |
if (data.size() < kPacketHeaderSize + kPacketLengthOffset) { |
@@ -519,6 +525,10 @@ void P2PSocketHostStunTcp::DoSend(const net::IPEndPoint& to, |
new net::DrainableIOBuffer(new net::IOBuffer(size), size); |
memcpy(buffer->data(), &data[0], data.size()); |
+ // Update HMAC before writing padding bytes at the end. |
Solis
2014/03/06 09:41:53
Comment is not true. AST will also be updated if p
Mallinath (Gone from Chromium)
2014/03/06 16:18:13
comment is still true, I just not mentioned AST in
Solis
2014/03/06 16:36:28
Don't you think that is misleading? Remove the com
Mallinath (Gone from Chromium)
2014/03/07 04:02:37
Done.
|
+ packet_processing_helpers::MaybeUpdatePacketAbsSendTimeExtnAndRtpAuthTag( |
+ buffer->data(), data.size(), options); |
+ |
if (pad_bytes) { |
char padding[4] = {0}; |
DCHECK_LE(pad_bytes, 4); |