diff options
author | Liam Wilson <37528501+liwilson1@users.noreply.github.com> | 2024-09-20 20:25:41 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-20 10:25:41 +0200 |
commit | 80971e4a173a046adf0cab703387184f205bf596 (patch) | |
tree | 6935e9b4b76a403d8aa27731d73a106dd3f34559 /fuzz/fuzz_config.cpp | |
parent | 191694f797639fc0b56adcf050bc9cfa8dc02f3d (diff) |
Allow IP guess before port in ndpi_detection_giveup (#2562)
Add dpi.guess_ip_before_port which when enabled uses classification
by-ip before classification by-port.
Diffstat (limited to 'fuzz/fuzz_config.cpp')
-rw-r--r-- | fuzz/fuzz_config.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fuzz/fuzz_config.cpp b/fuzz/fuzz_config.cpp index 4a5715551..a23b74c30 100644 --- a/fuzz/fuzz_config.cpp +++ b/fuzz/fuzz_config.cpp @@ -324,6 +324,11 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if(fuzzed_data.ConsumeBool()) { value = fuzzed_data.ConsumeIntegralInRange(0, 1 + 1); snprintf(cfg_value, sizeof(cfg_value), "%d", value); + ndpi_set_config(ndpi_info_mod, NULL, "dpi.guess_ip_before_port", cfg_value); + } + if(fuzzed_data.ConsumeBool()) { + value = fuzzed_data.ConsumeIntegralInRange(0, 1 + 1); + snprintf(cfg_value, sizeof(cfg_value), "%d", value); ndpi_set_config(ndpi_info_mod, NULL, "fpc", cfg_value); } if(fuzzed_data.ConsumeBool()) { |