From: Russ Combs (rucombs) Date: Thu, 19 Dec 2019 21:43:48 +0000 (+0000) Subject: Merge pull request #1879 in SNORT/snort3 from ~RUCOMBS/snort3:offload_count to master X-Git-Tag: 3.0.0-267~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42471f1dc65c685cc6bea9143c3b19ce15615289;p=thirdparty%2Fsnort3.git Merge pull request #1879 in SNORT/snort3 from ~RUCOMBS/snort3:offload_count to master Squashed commit of the following: commit 1212fbdff4d8b7afb71ec9b8ce26256806b4ae29 Author: russ Date: Thu Dec 5 07:58:10 2019 -0500 search_engine: fix expected count of MPSEs when offloading --- diff --git a/src/detection/fp_create.cc b/src/detection/fp_create.cc index 2914a4b23..2b27a7aa4 100644 --- a/src/detection/fp_create.cc +++ b/src/detection/fp_create.cc @@ -1728,9 +1728,10 @@ int fpCreateFastPacketDetection(SnortConfig* sc) if ( !sc->test_mode() or sc->mem_check() ) { unsigned c = compile_mpses(sc, can_build_mt(fp)); + unsigned expected = mpse_count + offload_mpse_count; - if ( c != mpse_count ) - ParseError("Failed to compile %u search engines", mpse_count - c); + if ( c != expected ) + ParseError("Failed to compile %u search engines", expected - c); } fp_print_port_groups(port_tables);