diff --git a/src/tsg_entry.cpp b/src/tsg_entry.cpp index 99f06d3..bdca16e 100644 --- a/src/tsg_entry.cpp +++ b/src/tsg_entry.cpp @@ -1958,11 +1958,6 @@ static unsigned char tsg_master_all_entry(const struct streaminfo *a_stream, uns struct maat_rule shaping_results[MAX_RESULT_NUM]={0}; struct session_runtime_action_context *srt_action_context=(struct session_runtime_action_context *)(*pme); - if (a_stream->type == STREAM_TYPE_TCP && a_packet != NULL) - { - tsg_proxy_tcp_options_parse(a_stream, a_packet); - } - if(stream_state==OP_STATE_PENDING && srt_action_context->method_type!=TSG_METHOD_TYPE_SHUNT && !(srt_action_context->udp_data_dropme)) { if(srt_action_context->method_type==TSG_METHOD_TYPE_UNKNOWN) @@ -2184,6 +2179,11 @@ extern "C" unsigned char TSG_MASTER_TCPALL_ENTRY(const struct streaminfo *a_tcp, { _context->set_latency_flag=session_tcp_establish_latency_ms_set(a_tcp, thread_seq, a_packet); } + + if (a_packet != NULL) + { + tsg_proxy_tcp_options_parse(a_tcp, a_packet); + } unsigned char state=tsg_master_all_entry(a_tcp, a_tcp->pktstate, pme, thread_seq, a_packet); diff --git a/src/tsg_proxy.cpp b/src/tsg_proxy.cpp index cef41a5..7d7372f 100644 --- a/src/tsg_proxy.cpp +++ b/src/tsg_proxy.cpp @@ -318,7 +318,7 @@ void tsg_proxy_tcp_options_parse(const struct streaminfo *stream, const void *a_ return; } - if (tcp_attr->ignore) { + if (tcp_attr->first_data_pkt_processed) { return; } @@ -330,18 +330,8 @@ void tsg_proxy_tcp_options_parse(const struct streaminfo *stream, const void *a_ } if(stream->ptcpdetail->datalen > 0) { - if (tcp_attr->first_data_pkt_processed) { - struct maat_rule maat_rule; - int rule_num; - rule_num = session_matched_rules_copy(stream, TSG_SERVICE_INTERCEPT, &maat_rule, 1); - if (rule_num == 0) { - tcp_attr->ignore = 1; - } - } else { - tsg_proxy_first_data_process(stream, tcp_attr, &pktinfo); - tcp_attr->first_data_pkt_processed = 1; - } - + tsg_proxy_first_data_process(stream, tcp_attr, &pktinfo); + tcp_attr->first_data_pkt_processed = 1; return; } diff --git a/src/tsg_proxy.h b/src/tsg_proxy.h index 9565879..f485ac6 100644 --- a/src/tsg_proxy.h +++ b/src/tsg_proxy.h @@ -20,7 +20,6 @@ struct tsg_proxy_tcp_option struct tsg_proxy_tcp_attribute { uint8_t first_data_pkt_processed; - uint8_t ignore; uint32_t tcp_seq; uint32_t tcp_ack; uint8_t tcp_protocol;