summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author杨威 <[email protected]>2022-06-16 18:03:45 +0800
committer杨威 <[email protected]>2022-06-16 18:03:45 +0800
commitff46c8d289d179f3edf46c59c948ae08cade4c55 (patch)
tree886da6c7e0905d2c38192b0940d3f6911604328a
parent846204eae32769f634d914969ede76b8559663dd (diff)
🐞 fix(deal_tcp_stream): 仅在标记要丢弃的流检查超时前,更新最新到达时间v4.2.88
-rw-r--r--src/dealpkt/deal_tcp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dealpkt/deal_tcp.c b/src/dealpkt/deal_tcp.c
index 3a211d8..265e4e8 100644
--- a/src/dealpkt/deal_tcp.c
+++ b/src/dealpkt/deal_tcp.c
@@ -2781,8 +2781,6 @@ static int deal_tcp_stream(struct streamindex *pindex, const void *this_iphdr, s
pdetail_pr =(struct tcpdetail_private*)(pstream->pdetail);
pdetail =(struct tcpdetail *)(&pdetail_pr->tcpdetail_public);
- pdetail->lastmtime=g_CurrentTime;
- pstream_pr->stream_lastupdate_timestamp_ms=sapp_global_val->individual_volatile->current_time_ms;
/* ddos bypass���ȼ���� */
if(pstream_pr->under_ddos_bypass){
@@ -2828,6 +2826,8 @@ static int deal_tcp_stream(struct streamindex *pindex, const void *this_iphdr, s
if(unlikely(pdetail_pr->drop_stream_flag != 0)){
sapp_runtime_log(RLOG_LV_DEBUG, "TCP stream: %s, has been set drop flag, curdir:%d, return DROP.",
printaddr(&pstream->addr, pstream->threadnum), pstream->curdir);
+ pdetail->lastmtime = g_CurrentTime;
+ pstream_pr->stream_lastupdate_timestamp_ms = sapp_global_val->individual_volatile->current_time_ms;
lrustream(pindex_tcp);
return DROP;
}
@@ -2900,6 +2900,8 @@ static int deal_tcp_stream(struct streamindex *pindex, const void *this_iphdr, s
call_tcpall_after_reset = 1;
}
+ pdetail->lastmtime=g_CurrentTime;
+ pstream_pr->stream_lastupdate_timestamp_ms=sapp_global_val->individual_volatile->current_time_ms;
pstream->addr.pkttype = PKT_TYPE_NORMAL;//add by lqy 20151222, init pkttype
pdetail_pr->tcpoverlen=0;//add by lqy 20150325