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 2017/10/03 22:55:36 UTC

[trafficserver] branch quic-latest updated: Set default app name if client send no ALPN

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 4617336  Set default app name if client send no ALPN
4617336 is described below

commit 4617336ff08ad85c1e33ebad83aea45abf2af3ef
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Tue Oct 3 15:55:23 2017 -0700

    Set default app name if client send no ALPN
---
 iocore/net/QUICNetVConnection.cc | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index 39ad79c..ddefb82 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -436,8 +436,18 @@ QUICNetVConnection::state_handshake(int event, Event *data)
     const uint8_t *app_name;
     unsigned int app_name_len = 0;
     this->_handshake_handler->negotiated_application_name(&app_name, &app_name_len);
+    if (app_name == nullptr) {
+      app_name     = reinterpret_cast<const uint8_t *>(IP_PROTO_TAG_HTTP_QUIC.ptr());
+      app_name_len = IP_PROTO_TAG_HTTP_QUIC.size();
+    }
+
     Continuation *endpoint = this->_next_protocol_set->findEndpoint(app_name, app_name_len);
-    endpoint->handleEvent(NET_EVENT_ACCEPT, this);
+    if (endpoint == nullptr) {
+      this->_handle_error(
+        QUICErrorUPtr(new QUICConnectionError(QUICErrorClass::CRYPTOGRAPHIC, QUICErrorCode::VERSION_NEGOTIATION_ERROR)));
+    } else {
+      endpoint->handleEvent(NET_EVENT_ACCEPT, this);
+    }
   }
 
   return EVENT_CONT;

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].