1
0
Fork 0
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:
Ycarus (Yannick Chabanois) 2022-11-24 20:59:06 +01:00
parent 18542cb4d7
commit b151a4ec90
2 changed files with 2 additions and 37 deletions

View file

@ -10,9 +10,8 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ndpi-netfilter2 PKG_NAME:=ndpi-netfilter2
PKG_RELEASE:=3 PKG_RELEASE:=4
#PKG_REV:=b19e6392cf0c7d51c44e076a91fc4db0cbbd6403 PKG_REV:=cf017cc2fecee644d0b2ff633a17377f776d1505
PKG_REV:=ce5cca1ec5972f8404ad66ec750a3c10968010fd
PKG_VERSION:=4-$(PKG_REV) PKG_VERSION:=4-$(PKG_REV)
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git

View file

@ -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)