diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2023-07-14 23:19:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-14 23:19:30 +0200 |
commit | 5811a5613b85fe7d0c5b2d23f525b59ee98ec3fc (patch) | |
tree | dbcbcfa8af5dea715e7a99a3e32f89180e781d0b /src/lib/ndpi_main.c | |
parent | 8e960f033d2ea5abbd53d2a178a45132a0072062 (diff) |
Add a configuration knob to enable/disable loading of gambling list (#2047)
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r-- | src/lib/ndpi_main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index ca7bdd912..65257593e 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -941,8 +941,9 @@ static void init_string_based_protocols(struct ndpi_detection_module_struct *ndp for(i = 0; host_match[i].string_to_match != NULL; i++) ndpi_init_protocol_match(ndpi_str, &host_match[i]); - for(i = 0; ndpi_protocol_gambling_hostname_list[i].string_to_match != NULL; i++) - ndpi_init_protocol_match(ndpi_str, &ndpi_protocol_gambling_hostname_list[i]); + if(ndpi_str->enable_load_gambling_list) + for(i = 0; ndpi_protocol_gambling_hostname_list[i].string_to_match != NULL; i++) + ndpi_init_protocol_match(ndpi_str, &ndpi_protocol_gambling_hostname_list[i]); /* ************************ */ @@ -2776,6 +2777,10 @@ struct ndpi_detection_module_struct *ndpi_init_detection_module(ndpi_init_prefs if(prefs & ndpi_enable_ja3_plus) ndpi_str->enable_ja3_plus = 1; + ndpi_str->enable_load_gambling_list = 1; + if(prefs & ndpi_dont_load_gambling_list) + ndpi_str->enable_load_gambling_list = 0; + if(!(prefs & ndpi_dont_init_libgcrypt)) { if(!gcry_control (GCRYCTL_INITIALIZATION_FINISHED_P)) { const char *gcrypt_ver = gcry_check_version(NULL); |