This is an automated email from the ASF dual-hosted git repository.

maskit pushed a commit to branch quic-05
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

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

    Set default app name if client send no ALPN
    
    (cherry picked from commit 4617336ff08ad85c1e33ebad83aea45abf2af3ef)
---
 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" <commits@trafficserver.apache.org>.

Reply via email to