aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2021-03-26 15:53:04 +0100
committerLuca Deri <deri@ntop.org>2021-03-26 15:53:04 +0100
commitffbce931b981f466bdb82ce8ab757f871997e822 (patch)
tree04edaf7b7afdb632cbfd1d3f2e4d445b17654ed3
parenta6029d250d9c5dd0d7346fe47de838c243c20cac (diff)
Ignore TLD .local .lan and .home in DGA domain check
-rw-r--r--src/lib/ndpi_main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 18ad8f5b6..c43fb23a8 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -7318,7 +7318,12 @@ uint8_t ndpi_connection_tracking(struct ndpi_detection_module_struct *ndpi_str,
if((!name)
|| (strchr(name, '_') != NULL)
- || (endsWith(name, "in-addr.arpa", 12)))
+ || (endsWith(name, "in-addr.arpa", 12))
+ /* Ignore TLD .local .lan and .home */
+ || (endsWith(name, ".local", 6))
+ || (endsWith(name, ".lan", 4))
+ || (endsWith(name, ".home", 5))
+ )
return(0);
if(flow && (flow->packet.detected_protocol_stack[1] != NDPI_PROTOCOL_UNKNOWN))