diff options
| author | 李佳 <[email protected]> | 2019-10-18 14:46:21 +0800 |
|---|---|---|
| committer | 李佳 <[email protected]> | 2019-10-18 14:46:21 +0800 |
| commit | bea9d3d03804c0e4b12d8dab4d6933e4a5804be4 (patch) | |
| tree | e54a937d75d7fd65b547618babfee73302ea45e7 | |
| parent | 1e7f21b77b60a019b79858c21edd10607aa4aa54 (diff) | |
1.修改tcp流reset之后逻辑,仍然先调用tcpall再调用tcp插件; 2.修复plugctrl模块在退出之前,调用插件destroy的错误v3.0.3-parallelpangu_develop_parallel
| -rw-r--r-- | dealpkt/deal_tcp.c | 10 | ||||
| -rw-r--r-- | plugin/src/plugin.c | 20 |
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; |
