diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2024-09-17 11:46:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-17 11:46:55 +0200 |
commit | 9d07cf28114eaa6232e93248b2346710ae635bf3 (patch) | |
tree | 4a888ffc9f5c3275d738f94b99c2aed182c15181 /example | |
parent | a1602dd0a5f243da2aa550669c0c01c1c89cae52 (diff) |
fuzz: try to be a little bit faster (#2559)
Some fuzzers don't really need a real and complete local context.
Try to avoid setting it up, creating a simpler fake version with only the
features really needed.
That is a kind of experiment: if it works, we can extend the same logic
to other fuzzers
Diffstat (limited to 'example')
-rw-r--r-- | example/reader_util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/example/reader_util.c b/example/reader_util.c index 71f5ed39d..d38850fc4 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -372,6 +372,9 @@ int parse_proto_name_list(char *str, NDPI_PROTOCOL_BITMASK *bitmask, int inverte return 1; NDPI_BITMASK_SET_ALL(all); ndpi_set_protocol_detection_bitmask2(module, &all); + /* Try to be fast: we need only the protocol name -> protocol id mapping! */ + ndpi_set_config(module, "any", "ip_list.load", "0"); + ndpi_set_config(module, NULL, "flow_risk_lists.load", "0"); ndpi_finalize_initialization(module); for(n = strtok(str,_proto_delim); n && *n; n = strtok(NULL,_proto_delim)) { |