diff options
| author | yangwei <[email protected]> | 2024-04-10 14:33:41 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2024-04-12 00:42:29 +0800 |
| commit | 3bb30afc483bc0297b7b88901818021d3045d1d5 (patch) | |
| tree | 1e5858e311a4d1d8b873cb9b7f5e76588606dcd8 | |
| parent | a5aa6dbcffe729265571bfa2ee073c822172e318 (diff) | |
🐞 fix(Fix TSG-19781): tcp正序数据错误的被移动至closing表
| -rw-r--r-- | benchmark/sapp_default_config/etc/sapp.toml | 1 | ||||
| -rw-r--r-- | bin/etc/sapp.toml | 2 | ||||
| -rw-r--r-- | src/config/config_parse.cpp | 2 | ||||
| -rw-r--r-- | src/dealpkt/deal_tcp.c | 8 |
4 files changed, 7 insertions, 6 deletions
diff --git a/benchmark/sapp_default_config/etc/sapp.toml b/benchmark/sapp_default_config/etc/sapp.toml index 926c0e9..1144cf8 100644 --- a/benchmark/sapp_default_config/etc/sapp.toml +++ b/benchmark/sapp_default_config/etc/sapp.toml @@ -91,6 +91,7 @@ ### note, stream_id_base_time format is "%Y-%m-%d %H:%M:%S" stream_id_base_time="2021-01-01 00:00:00" [stream.tcp] + reorder_on_closing=1 max=10000 timeout=60 syn_mandatory=1 diff --git a/bin/etc/sapp.toml b/bin/etc/sapp.toml index a6edfb9..150e510 100644 --- a/bin/etc/sapp.toml +++ b/bin/etc/sapp.toml @@ -146,7 +146,7 @@ analyse_option_enabled=1 tuple4_reuse_time_interval=30 - #reorder_on_closing=1 + #reorder_on_closing=0 #max_opening_per_sec=5000 #max_timeouts_per_sec=5000 diff --git a/src/config/config_parse.cpp b/src/config/config_parse.cpp index 5b7d0f4..495a621 100644 --- a/src/config/config_parse.cpp +++ b/src/config/config_parse.cpp @@ -1766,7 +1766,7 @@ int sapp_parse_config(void) tomlc99_wrap_load_int_def(ABBR_CFG_FILE_MAIN_ENTRY, (char *)"stream.tcp", (char *)"timeout", (int *)&pconfig->stream.tcp.timeout, 180); tomlc99_wrap_load_int_def(ABBR_CFG_FILE_MAIN_ENTRY, (char *)"stream.tcp", (char *)"syn_mandatory", (int *)&pconfig->stream.tcp.syn_mandatory, 1); tomlc99_wrap_load_int_def(ABBR_CFG_FILE_MAIN_ENTRY, (char *)"stream.tcp", (char *)"reorder_pkt_max", (int *)&pconfig->stream.tcp.reorder_pkt_max, 5); - tomlc99_wrap_load_int_def(ABBR_CFG_FILE_MAIN_ENTRY, (char *)"stream.tcp", (char *)"reorder_on_closing", (int *)&pconfig->stream.tcp.reorder_on_closing, 1); + tomlc99_wrap_load_int_def(ABBR_CFG_FILE_MAIN_ENTRY, (char *)"stream.tcp", (char *)"reorder_on_closing", (int *)&pconfig->stream.tcp.reorder_on_closing, 0); tomlc99_wrap_load_int_def(ABBR_CFG_FILE_MAIN_ENTRY, (char *)"stream.tcp", (char *)"analyse_option_enabled", (int *)&pconfig->stream.tcp.analyse_option_enabled, 1); tomlc99_wrap_load_int_def(ABBR_CFG_FILE_MAIN_ENTRY, (char *)"stream.tcp", (char *)"tuple4_reuse_time_interval", (int *)&pconfig->stream.tcp.tuple4_reuse_time_interval, 30); tomlc99_wrap_load_int_def(ABBR_CFG_FILE_MAIN_ENTRY, (char *)"stream.tcp", (char *)"meaningful_statistics_minimum_pkt", (int *)&pconfig->stream.tcp.meaningful_statistics_minimum_pkt, 3); diff --git a/src/dealpkt/deal_tcp.c b/src/dealpkt/deal_tcp.c index 5a4b72a..b9a8bd4 100644 --- a/src/dealpkt/deal_tcp.c +++ b/src/dealpkt/deal_tcp.c @@ -2571,11 +2571,11 @@ static int tcp_deal_data_stream(struct streamindex *pindex,const void *this_iphd //���ϲ�ر����ӣ����ߴ������������rst���� - if((pstream->opstate==OP_STATE_CLOSE)&&(pdetail_pr->link_state!=STREAM_LINK_RESET)) + if((pstream->opstate==OP_STATE_CLOSE)&&(pstream->pktstate==OP_STATE_CLOSE )&&(pdetail_pr->link_state!=STREAM_LINK_RESET)) { tcp_change_stream_tonouse(pindex); return ret; - } + } if(ret==DROP) return DROP; @@ -2587,8 +2587,8 @@ static int tcp_deal_data_stream(struct streamindex *pindex,const void *this_iphd //���ϲ�ر����ӣ����ߴ������������rst���� /* 2017-08-01 lijia modify, ��Ҫ�ж�TCPALL���״̬, ����ֻ����TCPALL���ʱ, opstate�Ѿ���CLOSE��, ��������NOUSE̬ */ if((pstream->opstate==OP_STATE_CLOSE) - && (OP_STATE_CLOSE == pstream->pktstate) - &&(pdetail_pr->link_state!=STREAM_LINK_RESET)) + && (OP_STATE_CLOSE == pstream->pktstate) + &&(pdetail_pr->link_state!=STREAM_LINK_RESET)) { tcp_change_stream_tonouse(pindex); return ret; |
