Removed check fir skipping .arpa domains

This commit is contained in:
Luca Deri
2024-01-27 20:54:46 +01:00
parent ec83a592b8
commit 8e562c4ecd
+4 -8
View File
@@ -89,7 +89,6 @@ bool ndpi_domain_classify_add(ndpi_domain_classify *s,
u_int8_t class_id,
const char *domain) {
u_int32_t i;
char *dot;
u_int64_t hash;
if((!s) || (!domain))
@@ -98,13 +97,15 @@ bool ndpi_domain_classify_add(ndpi_domain_classify *s,
/* Skip initial string . in domain names */
while(domain[0] == '.') domain++;
dot = strrchr(domain, '.');
#if 0
char *dot = strrchr(domain, '.');
if(dot) {
if((!strcmp(dot, ".arpa")) || (!strcmp(dot, ".local")))
return(false);
}
#endif
for(i=0; i<MAX_NUM_NDPI_DOMAIN_CLASSIFICATIONS; i++) {
if(s->classes[i].class_id == class_id) {
break;
@@ -124,11 +125,6 @@ bool ndpi_domain_classify_add(ndpi_domain_classify *s,
hash = ndpi_quick_hash64(domain, strlen(domain));
#ifdef DEBUG_ADD
if(strcmp(domain, "execute-api.eu-north-1.amazonaws.com") == 0)
printf("[add] %s = %d [%llu]\n", domain, s->classes[i].class_id, hash);
#endif
return(ndpi_bitmap64_set(s->classes[i].domains, hash));
}