From 1dccaf37b075ebfb726d407b9c4d95fcf2983135 Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Tue, 11 Feb 2025 15:48:53 +0100 Subject: DNS: fix check for DGA domain (#2716) If we have a (potential) valid sub-classification, we shoudn't check for DGA, even if the subclassification itself is disabled! --- example/ndpiReader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'example/ndpiReader.c') diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 3845c0900..c8a2148ef 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -5187,12 +5187,12 @@ static void dgaUnitTest() { for(i=0; non_dga[i] != NULL; i++) { if(debug) printf("Checking non DGA %s\n", non_dga[i]); - assert(ndpi_check_dga_name(ndpi_str, NULL, (char*)non_dga[i], 1, 1) == 0); + assert(ndpi_check_dga_name(ndpi_str, NULL, (char*)non_dga[i], 1, 1, 0) == 0); } for(i=0; dga[i] != NULL; i++) { if(debug) printf("Checking DGA %s\n", non_dga[i]); - assert(ndpi_check_dga_name(ndpi_str, NULL, (char*)dga[i], 1, 1) == 1); + assert(ndpi_check_dga_name(ndpi_str, NULL, (char*)dga[i], 1, 1, 0) == 1); } ndpi_exit_detection_module(ndpi_str); -- cgit v1.2.3