diff options
| -rw-r--r-- | dealpkt/deal_tcp.c | 11 | ||||
| -rw-r--r-- | plugin/src/plugin.c | 8 |
2 files changed, 13 insertions, 6 deletions
diff --git a/dealpkt/deal_tcp.c b/dealpkt/deal_tcp.c index 9a9aef3..efa8d91 100644 --- a/dealpkt/deal_tcp.c +++ b/dealpkt/deal_tcp.c @@ -2439,6 +2439,7 @@ static int deal_tcp_stream(struct streamindex *pindex, const void *this_iphdr, s int retAll=PASS; struct streaminfo_private *pstream_pr = &pindex->stream; struct streaminfo *pstream = &pstream_pr->stream_public; + int call_tcpall_after_reset = 0; /* 2019-10-18 lijia modify, 当前流被reset之后,保证先调用tcpall,再调用tcp */ pindex_tcp = findstreamindex (pindex, raw_pkt); if(unlikely(!pindex_tcp)){ @@ -2571,7 +2572,13 @@ static int deal_tcp_stream(struct streamindex *pindex, const void *this_iphdr, s ret = tcp_reset_stream(pindex_tcp, this_iphdr,this_tcphdr, tcplen,raw_pkt); 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; @@ -2621,7 +2628,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 257b8ec..4d5224c 100644 --- a/plugin/src/plugin.c +++ b/plugin/src/plugin.c @@ -552,11 +552,11 @@ 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;
+ void* filepoint = NULL;
- int (*fun_init)();
- void (*fun_destroy)();
- void (*fun_getplugid)(unsigned short plugid);
+ int (*fun_init)() = NULL;
+ void (*fun_destroy)() = NULL;
+ void (*fun_getplugid)(unsigned short plugid) = NULL;
//load FILENAME
|
