]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #1879 in SNORT/snort3 from ~RUCOMBS/snort3:offload_count to master
authorRuss Combs (rucombs) <rucombs@cisco.com>
Thu, 19 Dec 2019 21:43:48 +0000 (21:43 +0000)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Thu, 19 Dec 2019 21:43:48 +0000 (21:43 +0000)
Squashed commit of the following:

commit 1212fbdff4d8b7afb71ec9b8ce26256806b4ae29
Author: russ <rucombs@cisco.com>
Date:   Thu Dec 5 07:58:10 2019 -0500

    search_engine: fix expected count of MPSEs when offloading

src/detection/fp_create.cc

index 2914a4b23623ec4fb17d75df7f484a893e75e826..2b27a7aa479481c3609e88a0b9a81641caa96cb9 100644 (file)
@@ -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);