diff options
| author | lijia <[email protected]> | 2020-09-18 19:19:09 +0800 |
|---|---|---|
| committer | lijia <[email protected]> | 2020-09-18 19:19:09 +0800 |
| commit | 4f2839a4a3d0245d01f31c2e14a1d4ae77414acf (patch) | |
| tree | 218a2536a28d5ed96b7cea09182febd2863e0a66 | |
| parent | 5f6039c9bc77021a8fc77fa65a54330215149a94 (diff) | |
修复KNI返回DROPPKT|KILL_OTHER无效的BUG.v4.1.7
| -rw-r--r-- | src/dealpkt/callapp.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/dealpkt/callapp.c b/src/dealpkt/callapp.c index a6a9405..e86b852 100644 --- a/src/dealpkt/callapp.c +++ b/src/dealpkt/callapp.c @@ -385,6 +385,7 @@ int stream_process(struct streaminfo *a_stream,const void *this_iphdr, const voi StreamFunInfo *pNext=NULL,*pPrev=NULL;
UCHAR threadnum = a_stream->threadnum;
UCHAR local_app_ret;
+ int break_flag = 0;
if(funnum==0)
{
@@ -406,6 +407,7 @@ int stream_process(struct streaminfo *a_stream,const void *this_iphdr, const voi for(i=0;i<funnum;i++)
{
+ break_flag = 0;
if(pFunInfo==NULL)
{
pFunInfo=(StreamFunInfo *)dictator_malloc(threadnum,sizeof(StreamFunInfo));
@@ -476,14 +478,17 @@ int stream_process(struct streaminfo *a_stream,const void *this_iphdr, const voi /* 2019-11-15 lijia add for plug kill other */
if(local_app_ret & (APP_STATE_KILL_FOLLOW | APP_STATE_KILL_OTHER)){
/* �����pending��, KILL FOLLOWֱ���˳�ѭ������ */
- break;
+ break_flag = 1;
}
if(local_app_ret & APP_STATE_DROPPKT)
{
ret=DROP;
- break; //2020-09-10 lijia add, �������������
- }
+ break_flag = 1;
+ }
+ if(break_flag){//2020-09-10 lijia add, �������������
+ break;
+ }
}
//����Ҫ�ٴ��������fun���������ͷ�
@@ -521,6 +526,7 @@ int stream_process(struct streaminfo *a_stream,const void *this_iphdr, const voi pPrev=NULL;
while(pFunInfo)
{
+ break_flag = 0;
//add by lqy 20141230
//ע�����µ�ֻ����stream_raw���͵ĺ������������ò�һ��
//if(pFunInfo->funtype>FUN_TYPE_IPV6_RAW)
@@ -605,13 +611,17 @@ int stream_process(struct streaminfo *a_stream,const void *this_iphdr, const voi /* 2019-11-15 lijia add for plug kill other */
if(local_app_ret & (APP_STATE_KILL_FOLLOW | APP_STATE_KILL_OTHER)){
- break;
+ break_flag = 1;
}
if(local_app_ret&APP_STATE_DROPPKT)
{
ret=DROP;
- break; //2020-09-10 lijia add, �������������
- }
+ break_flag = 1;
+ }
+
+ if(break_flag){
+ break;
+ }
}
//���������д�Ҷ�����Ҫ��
@@ -626,6 +636,7 @@ int stream_process(struct streaminfo *a_stream,const void *this_iphdr, const voi pFunInfo=pFunList;
while(pFunInfo)
{
+ break_flag = 0;
//add by lqy 20141230
//ע�����µ�ֻ����stream_raw���͵ĺ������������ò�һ��
//if(pFunInfo->funtype>FUN_TYPE_IPV6_RAW)
|
