summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dealpkt/deal_tcp.c10
-rw-r--r--plugin/src/plugin.c20
2 files changed, 19 insertions, 11 deletions
diff --git a/dealpkt/deal_tcp.c b/dealpkt/deal_tcp.c
index c4a8c8a..0b3f6f1 100644
--- a/dealpkt/deal_tcp.c
+++ b/dealpkt/deal_tcp.c
@@ -2447,6 +2447,7 @@ static int deal_tcp_stream(struct streamindex *pindex, const void *this_iphdr, s
struct tcpdetail_private *pdetail_pr=NULL;
int ret=PASS;
int retAll=PASS;
+ int call_tcpall_after_reset = 0; /* 2019-10-18 lijia modify, ��ǰ����reset֮��,��֤�ȵ���tcpall,�ٵ���tcp */
struct streaminfo_private *pstream_pr = &pindex->stream;
struct streaminfo *pstream = &pstream_pr->stream_public;
int try_to_update_addr_info = 0;
@@ -2609,6 +2610,13 @@ static int deal_tcp_stream(struct streamindex *pindex, const void *this_iphdr, s
if(0 == ret){
return PASS;
}
+
+ ret = tcp_processallpkt(pstream, this_iphdr, this_tcphdr, tcplen, raw_pkt);
+ if(DROP == ret){
+ return DROP;
+ }
+
+ call_tcpall_after_reset = 1;
}
pdetail->lastmtime=g_CurrentTime;
@@ -2656,7 +2664,7 @@ static int deal_tcp_stream(struct streamindex *pindex, const void *this_iphdr, s
}
//adjust by lqy 20150107 Ϊ�˷�ֹSYN�ؽ�����ʱSYN�ڵ�һ��������
- if(pindex_tcp && (pstream->pktstate!=OP_STATE_CLOSE))
+ if((0 == call_tcpall_after_reset) && pindex_tcp && (pstream->pktstate!=OP_STATE_CLOSE))
{
//ȫ���ӿ��õ�������ָ��ǰ����ԭʼ����
if(tcplen == 0)
diff --git a/plugin/src/plugin.c b/plugin/src/plugin.c
index 33feff9..2e46f68 100644
--- a/plugin/src/plugin.c
+++ b/plugin/src/plugin.c
@@ -643,11 +643,10 @@ int process_confelem_sofilename(char* filename,int plugtype,stProtocolPlugInfo*
char buf_sofilename[PLUGIN_MAX_CONFLEN]={0};
char buf_funname[PLUGIN_MAX_CONFLEN]= {0};
- void* filepoint;
-
- int (*fun_init)();
- void (*fun_destroy)();
- void (*fun_getplugid)(unsigned short plugid);
+ void* filepoint = NULL;
+ int (*fun_init)() = NULL;
+ void (*fun_destroy)() = NULL;
+ void (*fun_getplugid)(unsigned short plugid) = NULL;
//load FILENAME
@@ -1762,6 +1761,7 @@ extern stProtocolPlugInfo* g_protocol_plug_info;
void plugctrl_destroy_all_plug(void)
{
stBusinessPlugInfo *plug_info;
+ stProtocolPlugInfo *pro_plug_info;
plug_info = g_platform_plug_info;
while(plug_info){
@@ -1771,12 +1771,12 @@ void plugctrl_destroy_all_plug(void)
plug_info = plug_info->next;
}
- plug_info = g_protocol_plug_info;
- while(plug_info){
- if(plug_info->fun_destroy){
- plug_info->fun_destroy();
+ pro_plug_info = g_protocol_plug_info;
+ while(pro_plug_info){
+ if(pro_plug_info->fun_destroy){
+ pro_plug_info->fun_destroy();
}
- plug_info = plug_info->next;
+ pro_plug_info = pro_plug_info->next;
}
plug_info = g_business_plug_info;