添加是否调用业务层的开关
This commit is contained in:
@@ -175,6 +175,7 @@ struct _quic_context
|
||||
{
|
||||
int is_quic;
|
||||
int link_state;
|
||||
int call_business;
|
||||
void *business_pme;
|
||||
struct _quic_info quic_info;
|
||||
};
|
||||
|
||||
@@ -614,21 +614,21 @@ int gquic_frame_type_stream(struct streaminfo *pstream, struct _quic_context* _c
|
||||
{
|
||||
case CHLO: //MTAG_CHLO;
|
||||
ret=parse_extension_tag(pstream, &_context->quic_info.client_hello, a_packet, payload, payload_len, used_len, tag_num);
|
||||
if(ret>=0)
|
||||
if(ret>=0 && _context->call_business)
|
||||
{
|
||||
ret=quic_callPlugins(pstream, _context, (void *)(_context->quic_info.client_hello), sizeof(void *), QUIC_CLIENT_HELLO_MASK, a_packet);
|
||||
}
|
||||
break;
|
||||
case SHLO: //MTAG_SHLO;
|
||||
ret=parse_extension_tag(pstream, &_context->quic_info.server_hello, a_packet, payload, payload_len, used_len, tag_num);
|
||||
if(ret>=0)
|
||||
if(ret>=0 && _context->call_business)
|
||||
{
|
||||
ret=quic_callPlugins(pstream, _context, (void *)(_context->quic_info.server_hello), sizeof(void *), QUIC_SERVER_HELLO_MASK, a_packet);
|
||||
}
|
||||
break;
|
||||
case REJ: //MTAG_REJ;
|
||||
ret=parse_extension_tag(pstream, &_context->quic_info.rejection, a_packet, payload, payload_len, used_len, tag_num);
|
||||
if(ret>=0)
|
||||
if(ret>=0 && _context->call_business)
|
||||
{
|
||||
ret=quic_callPlugins(pstream, _context, (void *)(_context->quic_info.rejection), sizeof(void *), QUIC_REJECTION_MASK, a_packet);
|
||||
}
|
||||
@@ -834,7 +834,7 @@ 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(is_gquic!=QUIC_VERSION_UNKNOWN)
|
||||
{
|
||||
if(_context->quic_info.quic_hdr.packet_number==1)
|
||||
if(_context->quic_info.quic_hdr.packet_number==1 && _context->call_business)
|
||||
{
|
||||
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);
|
||||
if(ret&APP_STATE_DROPME | ret&APP_STATE_DROPPKT)
|
||||
|
||||
@@ -255,6 +255,7 @@ extern "C" char QUIC_ENTRY(struct streaminfo *pstream, void**pme, int thread_seq
|
||||
{
|
||||
quic_init_stream(pme, thread_seq);
|
||||
_context=(struct _quic_context *)*pme;
|
||||
_context->call_business=TRUE;
|
||||
}
|
||||
|
||||
switch(pstream->opstate)
|
||||
|
||||
Reference in New Issue
Block a user