aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/ndpi_main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 7b279a906..9e2f3b68b 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -7514,6 +7514,15 @@ int ndpi_check_dga_name(struct ndpi_detection_module_struct *ndpi_str,
if(ndpi_match_string_subprotocol(ndpi_str, name, strlen(name), &ret_match, 1) > 0)
return(0); /* Ignore DGA for known domain names */
+
+ if(isnumber(name[0])) {
+ struct in_addr ip_addr;
+ char buf[22];
+
+ ip_addr.s_addr = inet_addr(buf);
+ if(strcmp(inet_ntoa(ip_addr), buf) == 0)
+ return(0); /* Ignore numeric IPs */
+ }
if(strncmp(name, "www.", 4) == 0)
name = &name[4];