diff options
| author | lijia <[email protected]> | 2021-05-08 14:01:37 +0800 |
|---|---|---|
| committer | lijia <[email protected]> | 2021-05-08 14:01:37 +0800 |
| commit | b0d75189ca53a94a144277488b229492a8b05f0a (patch) | |
| tree | 2ff0e31a792b9226fef3aeb1914191b85501977e | |
| parent | 26cc4b90d7c4190bbe05f07770da945836c0ac5b (diff) | |
TSG-6246, 修复四元组重用时, 流创建时间没有更新的bug.v4.2.35
| -rw-r--r-- | include/public/stream_inc/stream_control.h | 2 | ||||
| -rw-r--r-- | src/dealpkt/deal_tcp.c | 5 | ||||
| -rw-r--r-- | src/dealpkt/deal_udp.c | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/include/public/stream_inc/stream_control.h b/include/public/stream_inc/stream_control.h index 6432384..bffb602 100644 --- a/include/public/stream_inc/stream_control.h +++ b/include/public/stream_inc/stream_control.h @@ -38,7 +38,7 @@ enum MESA_stream_opt{ MSO_TOTAL_INBOUND_BYTE, /* inbound packet byte of this stream, opt_val type must be unsigned long long */
MSO_TOTAL_OUTBOUND_PKT, /* outbound packet pkt of this stream, opt_val type must be unsigned long long */
MSO_TOTAL_OUTBOUND_BYTE,/* outbound packet byte of this stream, opt_val type must be unsigned long long */
- MSO_STREAM_CREATE_TIMESTAMP_MS,/* first c2s pkt arrive timestamp of this stream, opt_val type must be unsigned long long */
+ MSO_STREAM_CREATE_TIMESTAMP_MS,/* first pkt arrive timestamp of this stream, opt_val type must be unsigned long long */
MSO_TOTAL_INBOUND_BYTE_RAW, /* inbound packet byte of this stream, raw packet len, include ip hdr, ethernet hdr... opt_val type must be unsigned long long */
MSO_TOTAL_OUTBOUND_BYTE_RAW,/* outbound packet byte of this stream, raw packet len, include ip hdr, ethernet hdr... opt_val type must be unsigned long long */
MSO_STREAM_UP_LAYER_TUNNEL_TYPE, /* opt_val must be unsigned short, refer to enum stream_carry_tunnel_t */
diff --git a/src/dealpkt/deal_tcp.c b/src/dealpkt/deal_tcp.c index bb06f97..f5772b6 100644 --- a/src/dealpkt/deal_tcp.c +++ b/src/dealpkt/deal_tcp.c @@ -682,8 +682,13 @@ static struct streamindex *tcp_add_new_stream_bysyn(struct streamindex *pindex, pdetail->serverbytes=datalen; } pstream_pr->stream_killed_flag = 0; + pstream_pr->has_duplicate_pkt = 0; + pdetail_pr->drop_stream_flag = 0; + /* ���Ӹ���, ��������һ���µ�streamid */ pindex_tcp->stream.global_stream_id = get_global_stream_id(threadnum); + pdetail->createtime=g_CurrentTime; + pstream_pr->stream_create_timestamp_ms=sapp_global_val->individual_volatile->current_time_ms; } /* 2014-07-31 LiJia add, for set one stream unorder number */ diff --git a/src/dealpkt/deal_udp.c b/src/dealpkt/deal_udp.c index ae4bcb5..40621fb 100644 --- a/src/dealpkt/deal_udp.c +++ b/src/dealpkt/deal_udp.c @@ -383,6 +383,10 @@ static int udp_reset_stream_bytime(struct streamindex *pindex) pstream->opstate=OP_STATE_PENDING; pstream->pktstate=OP_STATE_PENDING; + pstream_pr->has_duplicate_pkt = 0; + pstream_pr->stream_killed_flag = 0; + pdetail_pr->drop_stream_flag = 0; + pdetail->createtime=g_CurrentTime; pstream_pr->stream_create_timestamp_ms=sapp_global_val->individual_volatile->current_time_ms; plist=&(G_MESA_GLOBAL_STREAM[threadnum]->udpList[UDP_ONE_STATE]); |
