summaryrefslogtreecommitdiff
path: root/src/gquic_process.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gquic_process.cpp')
-rw-r--r--src/gquic_process.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gquic_process.cpp b/src/gquic_process.cpp
index 0f185ca..fa7f641 100644
--- a/src/gquic_process.cpp
+++ b/src/gquic_process.cpp
@@ -1169,7 +1169,7 @@ int parse_encrypt_client_hello(struct streaminfo *pstream, struct _quic_stream *
used_len+=skip_len;
extension_total_len=(int)get_value(payload, &used_len, 2); //Extension length
- if(!check_length(payload_len-used_len, extension_total_len))
+ if(!check_length(payload_len-used_len, extension_total_len) && (payload_len-used_len!=extension_total_len))
{
return flags;
}
@@ -1235,6 +1235,9 @@ int parse_decrypt_quic(struct streaminfo *pstream, struct _quic_context* _contex
{
_context->quic_info.client_hello=(struct _quic_stream *)dictator_malloc(pstream->threadnum, sizeof(struct _quic_stream));
memset(_context->quic_info.client_hello, 0, sizeof(struct _quic_stream));
+ _context->quic_info.client_hello->sni_idx=0xFF;
+ _context->quic_info.client_hello->ua_idx=0xFF;
+ _context->quic_info.client_hello->ver_idx=0xFF;
}
ret=parse_encrypt_client_hello(pstream, _context->quic_info.client_hello, a_packet, payload+*used_len, payload_len-*used_len); //Frame Type=1, offset=1, length=2
if(ret>0 && _context->call_business)
@@ -1314,7 +1317,7 @@ int quic_process(struct streaminfo *pstream, struct _quic_context* _context, int
ret=dissect_quic((char *)udp_detail->pdata, udp_detail->datalen, decrypt_payload, &decrypt_payload_len);
if(ret!=1)
{
- return APP_STATE_DROPME;
+ return APP_STATE_GIVEME;
}
ret=parse_decrypt_quic(pstream, _context, a_packet, decrypt_payload, decrypt_payload_len, &used_len);
break;
@@ -1373,7 +1376,7 @@ unsigned int quic_protocol_identify(struct streaminfo *a_stream, void *a_packet,
ret=quic_process(a_stream, _context, a_stream->threadnum, a_packet);
if(ret!=PROT_STATE_DROPME && _context->is_quic!=QUIC_VERSION_UNKNOWN)
{
- if(_context->quic_info.client_hello!=NULL)
+ if(_context->quic_info.client_hello!=NULL && _context->quic_info.client_hello->ext_tags!=NULL)
{
if(_context->quic_info.client_hello->sni_idx!=0xFF)
{