Fixed issue on DGA numeric IP detection

This commit is contained in:
Luca Deri
2021-10-13 19:21:27 +02:00
parent 09668496c3
commit 6e649e0cb6
+2 -3
View File
@@ -7517,10 +7517,9 @@ int ndpi_check_dga_name(struct ndpi_detection_module_struct *ndpi_str,
if(isdigit(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)
ip_addr.s_addr = inet_addr(name);
if(strcmp(inet_ntoa(ip_addr), name) == 0)
return(0); /* Ignore numeric IPs */
}