DNS: rework adding entries to the FPC-DNS cache (#2730)

Try to populate the FPC-DNS cache using directly the info from the current
packet, and not from the metadata saved in `struct ndpi_flow_struct`. This
will be important when adding monitoring support
This commit is contained in:
Ivan Nardi 2025-02-16 13:33:08 +01:00 committed by GitHub
parent c458c42712
commit 7dc5890c0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 61 additions and 62 deletions

View file

@ -654,7 +654,7 @@ int load_config_file_fd(struct ndpi_detection_module_struct *ndpi_str, FILE *fd)
int load_category_file_fd(struct ndpi_detection_module_struct *ndpi_str,
FILE *fd, ndpi_protocol_category_t category_id);
u_int64_t fpc_dns_cache_key_from_dns_info(struct ndpi_flow_struct *flow);
u_int64_t fpc_dns_cache_key_from_flow(struct ndpi_flow_struct *flow);
bool ndpi_cache_address(struct ndpi_detection_module_struct *ndpi_struct,
ndpi_ip_addr_t ip_addr, char *hostname,