aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/ndpi_main.c2
-rw-r--r--tests/cfgs/subclassification_disable/result/anydesk.pcapng.out2
-rw-r--r--tests/cfgs/subclassification_disable/result/dns.pcap.out2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 5b5506195..b67244695 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -10343,6 +10343,8 @@ static u_int16_t ndpi_automa_match_string_subprotocol(struct ndpi_detection_modu
return(flow->detected_protocol_stack[0]);
}
+ if(!flow && matching_protocol_id != NDPI_PROTOCOL_UNKNOWN)
+ return matching_protocol_id;
#ifdef NDPI_ENABLE_DEBUG_MESSAGES
{
diff --git a/tests/cfgs/subclassification_disable/result/anydesk.pcapng.out b/tests/cfgs/subclassification_disable/result/anydesk.pcapng.out
index 9dd0e66d4..e2785ae42 100644
--- a/tests/cfgs/subclassification_disable/result/anydesk.pcapng.out
+++ b/tests/cfgs/subclassification_disable/result/anydesk.pcapng.out
@@ -8,7 +8,7 @@ LRU cache stun: 0/0/0 (insert/search/found)
LRU cache tls_cert: 0/0/0 (insert/search/found)
LRU cache mining: 0/0/0 (insert/search/found)
LRU cache msteams: 0/0/0 (insert/search/found)
-LRU cache fpc_dns: 0/4/0 (insert/search/found)
+LRU cache fpc_dns: 2/4/0 (insert/search/found)
Automa host: 4/4 (search/found)
Automa domain: 0/0 (search/found)
Automa tls cert: 0/0 (search/found)
diff --git a/tests/cfgs/subclassification_disable/result/dns.pcap.out b/tests/cfgs/subclassification_disable/result/dns.pcap.out
index f72b6eab8..6046db332 100644
--- a/tests/cfgs/subclassification_disable/result/dns.pcap.out
+++ b/tests/cfgs/subclassification_disable/result/dns.pcap.out
@@ -7,7 +7,7 @@ LRU cache stun: 0/0/0 (insert/search/found)
LRU cache tls_cert: 0/0/0 (insert/search/found)
LRU cache mining: 0/0/0 (insert/search/found)
LRU cache msteams: 0/0/0 (insert/search/found)
-LRU cache fpc_dns: 0/0/0 (insert/search/found)
+LRU cache fpc_dns: 1/0/0 (insert/search/found)
Automa host: 3/3 (search/found)
Automa domain: 0/0 (search/found)
Automa tls cert: 0/0 (search/found)