From 3ec27f95f14ae5952ad09c84039db333d87887b3 Mon Sep 17 00:00:00 2001 From: liuxueli Date: Sun, 22 Nov 2020 16:55:49 +0600 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DCLOSE=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=9C=AA=E8=B0=83=E7=94=A8=E4=B8=9A=E5=8A=A1=E5=B1=82=E7=9A=84?= =?UTF-8?q?BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gquic_process.c | 8 +++++++- src/gquic_process.h | 2 ++ src/quic_analysis.c | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gquic_process.c b/src/gquic_process.c index e8ccd86..15f5074 100644 --- a/src/gquic_process.c +++ b/src/gquic_process.c @@ -67,6 +67,7 @@ int quic_getLinkState(struct _quic_context *_context) if(0==_context->link_state) { state=SESSION_STATE_PENDING|SESSION_STATE_DATA; + _context->link_state=1; } else { @@ -896,9 +897,14 @@ int quic_process(struct streaminfo *pstream, struct _quic_context* _context, int } is_gquic=is_quic_protocol(pstream, _context, (char *)udp_detail->pdata, udp_detail->datalen, &used_len); + if(!_context->call_business) + { + return APP_STATE_GIVEME; + } + if(is_gquic!=QUIC_VERSION_UNKNOWN) { - if(_context->cb_version==0 && _context->call_business) + if(_context->cb_version==0) { _context->cb_version=1; ret=quic_callPlugins(pstream, _context, &(_context->quic_info.quic_hdr.quic_version), sizeof(_context->quic_info.quic_hdr.quic_version), QUIC_USEING_VERSION_MASK, a_packet); diff --git a/src/gquic_process.h b/src/gquic_process.h index 07d547f..f05294f 100644 --- a/src/gquic_process.h +++ b/src/gquic_process.h @@ -296,5 +296,7 @@ struct _gquic_ack_frame_header unsigned int tag; }; +char quic_callPlugins(struct streaminfo *pstream, struct _quic_context *_context, void *buff, int buff_len, enum quic_interested_region region_mask, void *a_packet); + #endif diff --git a/src/quic_analysis.c b/src/quic_analysis.c index 11a7c0c..84f8f57 100644 --- a/src/quic_analysis.c +++ b/src/quic_analysis.c @@ -264,6 +264,7 @@ extern "C" char QUIC_ENTRY(struct streaminfo *pstream, void**pme, int thread_seq break; case OP_STATE_CLOSE: ret=quic_process(pstream, _context, thread_seq, a_packet); + quic_callPlugins(pstream, _context, NULL, 0, QUIC_INTEREST_KEY_MASK, a_packet); break; default: break;