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/04/16 03:51:41 UTC
[trafficserver] branch quic-latest updated: Add stateless reset
reasons on debug log
This is an automated email from the ASF dual-hosted git repository.
masaori 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 a41605a Add stateless reset reasons on debug log
a41605a is described below
commit a41605abef9b88cdd06aded881921434bd258c80
Author: Masaori Koshiba <ma...@gmail.com>
AuthorDate: Tue Apr 16 12:44:32 2019 +0900
Add stateless reset reasons on debug log
---
iocore/net/QUICPacketHandler.cc | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/iocore/net/QUICPacketHandler.cc b/iocore/net/QUICPacketHandler.cc
index 0e1b329..f75e395 100644
--- a/iocore/net/QUICPacketHandler.cc
+++ b/iocore/net/QUICPacketHandler.cc
@@ -295,6 +295,17 @@ QUICPacketHandlerIn::_recv_packet(int event, UDPPacket *udp_packet)
// Servers MUST drop incoming packets under all other circumstances. They SHOULD send a Stateless Reset (Section 6.10.4) if a
// connection ID is present in the header.
if ((!vc && !QUICInvariants::is_long_header(buf)) || (vc && vc->in_closed_queue)) {
+ if (is_debug_tag_set(debug_tag)) {
+ char dcid_str[QUICConnectionId::MAX_HEX_STR_LENGTH];
+ dcid.hex(dcid_str, QUICConnectionId::MAX_HEX_STR_LENGTH);
+
+ if (!vc && !QUICInvariants::is_long_header(buf)) {
+ QUICDebugDS(scid, dcid, "sent Stateless Reset : connection not found, dcid=%s", dcid_str);
+ } else if (vc && vc->in_closed_queue) {
+ QUICDebugDS(scid, dcid, "sent Stateless Reset : connection is already closed, dcid=%s", dcid_str);
+ }
+ }
+
QUICStatelessResetToken token(dcid, params->instance_id());
auto packet = QUICPacketFactory::create_stateless_reset_packet(dcid, token);
this->_send_packet(*packet, udp_packet->getConnection(), udp_packet->from, 1200, nullptr, 0);