diff options
| author | yangwei <[email protected]> | 2024-03-15 12:04:52 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2024-03-15 12:04:52 +0800 |
| commit | 7d14b84ee8eaef5270ca91c875e7981d45c6feff (patch) | |
| tree | 1fadb606109c057c6a084871d414ed39baba6ab7 | |
| parent | c714acbfdaeaea3b86e3daadd64313aafca03e8e (diff) | |
🐞 fix(ctrl pkt process): 设置stream_drop仍然上送控制报文
| -rw-r--r-- | src/dealpkt/deal_tcp.c | 4 | ||||
| -rw-r--r-- | src/dealpkt/deal_udp.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/dealpkt/deal_tcp.c b/src/dealpkt/deal_tcp.c index 3467309..f4b4964 100644 --- a/src/dealpkt/deal_tcp.c +++ b/src/dealpkt/deal_tcp.c @@ -2929,7 +2929,7 @@ static int deal_tcp_stream(struct streamindex *pindex, const void *this_iphdr, s /* 2014-10-11 lijia add, Fd������ƽ̨ʵ�� */ - if(unlikely(pstream_pr->stream_killed_flag != 0)){ + if(unlikely(pstream_pr->stream_killed_flag != 0) && raw_pkt->is_ctrl_pkt==0){ if((pdetail_pr->auto_remedy_flag != 0) && (tcplen > 0)){ /* ��ֹflood����, ֻ�д����ݵİ��ŷ�RST */ sapp_runtime_log(RLOG_LV_DEBUG, "TCP stream: %s, kill_tcp remedy, curdir:%d, send RST pkt.", printaddr(&pstream->addr, pstream->threadnum), pstream->curdir); @@ -2961,7 +2961,7 @@ static int deal_tcp_stream(struct streamindex *pindex, const void *this_iphdr, s return PASS; } - if(unlikely(pdetail_pr->drop_stream_flag != 0) ){ + if(unlikely(pdetail_pr->drop_stream_flag != 0) && raw_pkt->is_ctrl_pkt==0){ sapp_runtime_log(RLOG_LV_DEBUG, "TCP stream: %s, has been set drop flag, curdir:%d, return DROP.", printaddr(&pstream->addr, pstream->threadnum), pstream->curdir); pdetail->lastmtime = g_CurrentTime; diff --git a/src/dealpkt/deal_udp.c b/src/dealpkt/deal_udp.c index b86a82c..7b4066d 100644 --- a/src/dealpkt/deal_udp.c +++ b/src/dealpkt/deal_udp.c @@ -708,11 +708,11 @@ int dealipv4udppkt(struct streamindex *pindex, const struct mesa_ip4_hdr * this_ } /* 2014-11-15 lijia add, for udp serial kill udp */ - if(unlikely(a_index->stream.stream_killed_flag != 0)){ + if(unlikely(a_index->stream.stream_killed_flag != 0 && raw_pkt->is_ctrl_pkt==0)){ return DROP; } - if(unlikely(pdetail_pr->drop_stream_flag != 0)){ /* 2020-06-02 lijia add */ + if(unlikely(pdetail_pr->drop_stream_flag != 0) && raw_pkt->is_ctrl_pkt==0 ){ /* 2020-06-02 lijia add */ return DROP; } @@ -998,11 +998,11 @@ int dealipv6udppkt(struct streamindex *pindex,const struct mesa_ip6_hdr *a_packe } /* 2014-11-15 lijia add, for udp serial kill udp */ - if(unlikely(a_index->stream.stream_killed_flag != 0)){ + if(unlikely(a_index->stream.stream_killed_flag != 0) && raw_pkt->is_ctrl_pkt==0){ return DROP; } - if(unlikely(pdetail_pr->drop_stream_flag != 0)){ /* 2020-06-02 lijia add */ + if(unlikely(pdetail_pr->drop_stream_flag != 0) && raw_pkt->is_ctrl_pkt==0){ /* 2020-06-02 lijia add */ return DROP; } |
