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 2018/06/18 02:13:13 UTC
[trafficserver] branch quic-latest updated: Cleanup: remove unused
function
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 3c53ce8 Cleanup: remove unused function
3c53ce8 is described below
commit 3c53ce8fb9125361983cbcfb26b5374cc68d22de
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Mon Jun 18 11:08:31 2018 +0900
Cleanup: remove unused function
When ATS support omitting SCID, parsing Short Header packet and QUICConnectionTable structure should be revisited.
---
iocore/net/QUICPacketHandler.cc | 14 +++++++++-----
iocore/net/quic/QUICConnectionTable.cc | 9 ---------
iocore/net/quic/QUICConnectionTable.h | 5 -----
3 files changed, 9 insertions(+), 19 deletions(-)
diff --git a/iocore/net/QUICPacketHandler.cc b/iocore/net/QUICPacketHandler.cc
index ab8727b..fe84d23 100644
--- a/iocore/net/QUICPacketHandler.cc
+++ b/iocore/net/QUICPacketHandler.cc
@@ -186,8 +186,6 @@ QUICPacketHandlerIn::_recv_packet(int event, UDPPacket *udp_packet)
QUICConnectionId dcid = QUICConnectionId::ZERO();
QUICConnectionId scid = QUICConnectionId::ZERO();
- // TODO: lookup by 5-Tuple
- // When ATS omits SCID, endpoint omits DCID. In this case, we can't get DCID from SH packet, we need to lookup QC by 5-Tuple.
if (!QUICInvariants::dcid(dcid, buf, buf_len)) {
QUICDebug("Ignore packet - payload is too small");
udp_packet->free();
@@ -222,7 +220,13 @@ QUICPacketHandlerIn::_recv_packet(int event, UDPPacket *udp_packet)
udp_packet->free();
return;
}
+
+ if (dcid == QUICConnectionId::ZERO()) {
+ // TODO: lookup DCID by 5-tuple when ATS omits SCID
+ return;
+ }
} else {
+ // TODO: lookup DCID by 5-tuple when ATS omits SCID
if (is_debug_tag_set(tag)) {
ip_port_text_buffer ipb;
QUICDebugDS(scid, dcid, "recv SH packet from %s size=%" PRId64, ats_ip_nptop(&udp_packet->from.sa, ipb, sizeof(ipb)),
@@ -233,9 +237,9 @@ QUICPacketHandlerIn::_recv_packet(int event, UDPPacket *udp_packet)
QUICConnection *qc = this->_ctable->lookup(dcid);
QUICNetVConnection *vc = static_cast<QUICNetVConnection *>(qc);
- // 7.1. Matching Packets to Connections
- // A server that discards a packet that cannot be associated with a connection MAY also generate a stateless reset
- // Send stateless reset if the packet is not a initial packet or connection is closed.
+ // [draft-12] 6.1.2. Server Packet Handling
+ // 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 && !QUICTypeUtil::has_long_header(reinterpret_cast<const uint8_t *>(block->buf()))) || (vc && vc->in_closed_queue)) {
QUICStatelessResetToken token;
{
diff --git a/iocore/net/quic/QUICConnectionTable.cc b/iocore/net/quic/QUICConnectionTable.cc
index cda8c9a..2403a6d 100644
--- a/iocore/net/quic/QUICConnectionTable.cc
+++ b/iocore/net/quic/QUICConnectionTable.cc
@@ -55,15 +55,6 @@ QUICConnectionTable::erase(QUICConnectionId cid)
}
QUICConnection *
-QUICConnectionTable::lookup(QUICFiveTuple endpoint)
-{
- ink_assert(false);
- // TODO: find cid with five tuples
- // cid = this->_cids.get(endpoint);
- return nullptr;
-}
-
-QUICConnection *
QUICConnectionTable::lookup(QUICConnectionId cid)
{
SCOPED_MUTEX_LOCK(lock, _connections.lock_for_key(cid), this_ethread());
diff --git a/iocore/net/quic/QUICConnectionTable.h b/iocore/net/quic/QUICConnectionTable.h
index 45a6eba..b3576de 100644
--- a/iocore/net/quic/QUICConnectionTable.h
+++ b/iocore/net/quic/QUICConnectionTable.h
@@ -49,11 +49,6 @@ public:
QUICConnection *erase(QUICConnectionId cid);
/*
- * Lookup QUICConnection by 5-tuple
- */
- QUICConnection *lookup(QUICFiveTuple endpoint);
-
- /*
* Lookup QUICConnection by cid
*/
QUICConnection *lookup(QUICConnectionId cid);
--
To stop receiving notification emails like this one, please contact
masaori@apache.org.