You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2019/01/24 08:16:20 UTC
[trafficserver] branch quic-latest updated: Add PADDING frames if
packet is too small
This is an automated email from the ASF dual-hosted git repository.
maskit pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/quic-latest by this push:
new 67673b1 Add PADDING frames if packet is too small
67673b1 is described below
commit 67673b15edcf91dff08f94cb62c81059f6bf1b25
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Thu Jan 24 17:14:42 2019 +0900
Add PADDING frames if packet is too small
To gather enough sample for header protection.
---
iocore/net/QUICNetVConnection.cc | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index b7b366b..f8473ba 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -1476,6 +1476,13 @@ QUICNetVConnection::_packetize_frames(QUICEncryptionLevel level, uint64_t max_pa
memset(buf.get() + len, 0, min_size - len);
len += min_size - len;
}
+ } else {
+ // Pad with PADDING frames to make sure payload length satisfy the minimum length for sampling for header protection
+ if (3 > len) {
+ // FIXME QUICNetVConnection should not know the actual type value of PADDING frame
+ memset(buf.get() + len, 0, 3 - len);
+ len += 3 - len;
+ }
}
// Packet is retransmittable if it's not ack only packet