diff options
author | Luca Deri <deri@ntop.org> | 2024-01-27 20:39:47 +0100 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2024-01-27 20:40:27 +0100 |
commit | 65b9c68d7d92f615e2df5df0bb687dd7cfd7ac56 (patch) | |
tree | e81ce59a60fd64079423859503a5bb421d9cb020 /src/lib/ndpi_domains.c | |
parent | bcca89b78cdbc09d73987e5bdf728299f776c7a3 (diff) |
Fixed loading of non-ICANN domains that caused false positives with ndpi_load_domain_suffixes
Minor hash optimization
Diffstat (limited to 'src/lib/ndpi_domains.c')
-rw-r--r-- | src/lib/ndpi_domains.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/ndpi_domains.c b/src/lib/ndpi_domains.c index 3c59e3cd9..e7b283e54 100644 --- a/src/lib/ndpi_domains.c +++ b/src/lib/ndpi_domains.c @@ -47,6 +47,10 @@ int ndpi_load_domain_suffixes(struct ndpi_detection_module_struct *ndpi_str, while((line = fgets(buf, sizeof(buf), fd)) != NULL) { u_int offset, len; + + /* Skip private domains */ + if(strstr(line, "// ===END ICANN DOMAINS===")) + break; /* Skip empty lines or comments */ if((line[0] == '\0') || (line[0] == '/') || (line[0] == '\n') || (line[0] == '\r')) |