mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Update ndpi-netfilter2
This commit is contained in:
parent
18542cb4d7
commit
b151a4ec90
2 changed files with 2 additions and 37 deletions
|
@ -1,34 +0,0 @@
|
|||
From d238ff6ad1715a640df62c7b47373293c8c136bd Mon Sep 17 00:00:00 2001
|
||||
From: Vitaly Lavrov <vel21ripn@gmail.com>
|
||||
Date: Tue, 22 Nov 2022 15:18:46 +0300
|
||||
Subject: [PATCH] Fix confidence level after ndpi_detection_giveup()
|
||||
|
||||
---
|
||||
ndpi-netfilter/src/main.c | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/ndpi-netfilter/src/main.c b/ndpi-netfilter/src/main.c
|
||||
index 5582eee938..3c39af8d5e 100644
|
||||
--- a/ndpi-netfilter/src/main.c
|
||||
+++ b/ndpi-netfilter/src/main.c
|
||||
@@ -1676,9 +1676,20 @@ ndpi_mt(const struct sk_buff *skb, struct xt_action_param *par)
|
||||
detect_complete = 1;
|
||||
if(proto.app_protocol == NDPI_PROTOCOL_UNKNOWN) {
|
||||
u_int8_t proto_guessed;
|
||||
+ ndpi_protocol p_old = proto;
|
||||
proto = ndpi_detection_giveup(n->ndpi_struct, flow, 1, &proto_guessed);
|
||||
+ if(_DBG_TRACE_DPI) {
|
||||
+ if( p_old.app_protocol != proto.app_protocol ||
|
||||
+ p_old.master_protocol != proto.master_protocol ||
|
||||
+ confidence != flow->confidence)
|
||||
+ pr_info(" ndpi_process_packet ndpi_detection_giveup app,master [%u,%u]->[%u,%u] c %u->%u\n",
|
||||
+ p_old.app_protocol,p_old.master_protocol,
|
||||
+ proto.app_protocol,proto.master_protocol,
|
||||
+ confidence,flow->confidence);
|
||||
+ }
|
||||
ct_ndpi->proto.app_protocol = proto.app_protocol;
|
||||
ct_ndpi->proto.master_protocol = proto.master_protocol;
|
||||
+ ct_ndpi->confidence = confidence = flow->confidence;
|
||||
c_proto->proto = pack_proto(proto);
|
||||
}
|
||||
if(_DBG_TRACE_DDONE)
|
Loading…
Add table
Add a link
Reference in a new issue