summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlijia <[email protected]>2021-04-29 17:33:40 +0800
committerlijia <[email protected]>2021-04-29 17:33:40 +0800
commit4bbe85c8c16f9f176fee8f6712e12a971d9c9e58 (patch)
tree62468cce52dfc1700c7cdb8c862238ae416da027
parent84afc4b84399a674efa42c2183a7e65c1db8b4c2 (diff)
TSG-6232, 修复插件调用MSO_DROP_STREAM后还会被调用的BUG.v4.2.34
-rw-r--r--src/dealpkt/deal_tcp.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/src/dealpkt/deal_tcp.c b/src/dealpkt/deal_tcp.c
index 0607892..bb06f97 100644
--- a/src/dealpkt/deal_tcp.c
+++ b/src/dealpkt/deal_tcp.c
@@ -2027,25 +2027,29 @@ static int tcp_deal_unorder(struct streamindex *pindex,struct streaminfo *a_tcp,
#endif
if(pakiet->tcpdatalen >0)
{
+ /* 2021-04-29 lijia add, ���������Kill_tcp,����������MSO_DROP_STREAM, �������ݴ�������, Ҳ���ٵ��ò�� */
+ if((0 == a_tcp_pr->stream_killed_flag) && (0 == pdetail_pr->drop_stream_flag)){
#if (0 == HIGH_PERF)
- update_stream_ip_frag_list(a_tcp, pakiet->ipfrag_list);
- pakiet->ipfrag_list = NULL;
+ update_stream_ip_frag_list(a_tcp, pakiet->ipfrag_list);
+ pakiet->ipfrag_list = NULL;
#endif
- tmpktype=a_tcp->addr.pkttype;
- //a_tcp->addr.pkttype=tmpktype|PKT_TYPE_TCPUNORDER|a_tcp->pfather->addr.pkttype;
- a_tcp->addr.pkttype=PKT_TYPE_TCPREORDER;
- //ret=stream_process_tcp(a_tcp,pakiet->data,&(pdetail->apme),&(a_tcp->opstate));
- ret=stream_process_tcp(a_tcp,pakiet->this_ip_hdr,pakiet->this_tcp_hdr,&(pakiet->raw_pkt),&(pdetail_pr->apme),&(a_tcp->opstate));
- a_tcp->addr.pkttype=tmpktype;
-#if (0 == HIGH_PERF)
- raw_frags_list_free_stream(a_tcp->threadnum, a_tcp);
+ tmpktype=a_tcp->addr.pkttype;
+ //a_tcp->addr.pkttype=tmpktype|PKT_TYPE_TCPUNORDER|a_tcp->pfather->addr.pkttype;
+ a_tcp->addr.pkttype=PKT_TYPE_TCPREORDER;
+ //ret=stream_process_tcp(a_tcp,pakiet->data,&(pdetail->apme),&(a_tcp->opstate));
+ ret=stream_process_tcp(a_tcp,pakiet->this_ip_hdr,pakiet->this_tcp_hdr,&(pakiet->raw_pkt),&(pdetail_pr->apme),&(a_tcp->opstate));
+ a_tcp->addr.pkttype=tmpktype;
+#if (0 == HIGH_PERF)
+ raw_frags_list_free_stream(a_tcp->threadnum, a_tcp);
#endif
- tcp_clear_newdata(a_tcp,rcv);
+ tcp_clear_newdata(a_tcp,rcv);
+ }
+
//���ֵ���Ϣ����������
//if(ret!=PASS)
/* 2015-01-16 lijia modify, ����ģʽ��, ���������Kill_tcp(), �����᷵��DROP, Ϊ������������Կ��Կ����˰� */
//if((ret!=PASS) || (a_tcp_pr->stream_killed_flag != 0))
- if(a_tcp_pr->stream_killed_flag != 0) /* 2015-11-02 lqy modify, ������������жϷ���ֵ */
+ if((a_tcp_pr->stream_killed_flag != 0) || (pdetail_pr->drop_stream_flag != 0)) /* 2015-11-02 lqy modify, ������������жϷ���ֵ */
{
/* ��Ϊ������update_stream_list_raw_pkt_pointer, �˴����ܷ���, �Ȼָ�ԭʼ��ָ�� */
goto done;
@@ -2638,7 +2642,7 @@ static int deal_tcp_stream(struct streamindex *pindex, const void *this_iphdr, s
tcp_processallpkt(pstream,this_iphdr,this_tcphdr,tcplen,raw_pkt);
}
#endif
- //return DROP; /* 2019-11-20 lijia modify, kill_tcp��Ĭ����Ϊ����DROP, ȡ����drop_stream_flag */
+ //return DROP; /* 2019-11-20 lijia modify, kill_tcp��Ĭ����Ϊ����DROP, ֻ����rst��, �Ƿ񶪰�ȡ����drop_stream_flag */
}
if(unlikely(pdetail_pr->drop_stream_flag != 0)){