diff options
| author | yangwenlin <[email protected]> | 2022-01-11 19:26:10 +0800 |
|---|---|---|
| committer | liuxueli <[email protected]> | 2022-01-13 14:19:03 +0800 |
| commit | b1239d556e1f930417477a14fe0065197c3bd286 (patch) | |
| tree | 2724b4e31304d512b104a8e10bf006ab1a9e0706 /src/tsg_entry.cpp | |
| parent | 7d9131bec014ee1bf376f2bcf61bef8d5cd4a310 (diff) | |
TSG-9215: 修复tamper命中tcp后发送两次数据包问题,重新验证合入,之前合入的代码被覆盖了v5.4.28
Diffstat (limited to 'src/tsg_entry.cpp')
| -rw-r--r-- | src/tsg_entry.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/tsg_entry.cpp b/src/tsg_entry.cpp index 7fd456b..08f3138 100644 --- a/src/tsg_entry.cpp +++ b/src/tsg_entry.cpp @@ -1842,18 +1842,11 @@ static unsigned char tsg_master_all_entry(const struct streaminfo *a_stream, uns } break; case TSG_METHOD_TYPE_TAMPER: - if(0 == send_tamper_xxx(a_stream, &context->tamper_count, a_packet)){ - state|=APP_STATE_GIVEME|APP_STATE_DROPPKT; - }else{ - state=APP_STATE_GIVEME; + if(a_stream->opstate != OP_STATE_PENDING){ + if(0 == send_tamper_xxx(a_stream, &context->tamper_count, a_packet)){ + state|=APP_STATE_GIVEME|APP_STATE_DROPPKT; + } } - context->tamper_count += 1; - MESA_handle_runtime_log(g_tsg_para.logger, - RLOG_LV_DEBUG, - __FUNCTION__, - "Addr: %s, send_tamper_xxx num %ld", - PRINTADDR(a_stream, g_tsg_para.level), - context->tamper_count); break; case TSG_METHOD_TYPE_DEFAULT: if(!is_do_default_policy(a_stream, context->after_n_packets) || stream_state==OP_STATE_CLOSE) |
