]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #1138 in SNORT/snort3 from offload_crash to master
authorMichael Altizer (mialtize) <mialtize@cisco.com>
Tue, 20 Mar 2018 16:20:34 +0000 (12:20 -0400)
committerMichael Altizer (mialtize) <mialtize@cisco.com>
Tue, 20 Mar 2018 16:20:34 +0000 (12:20 -0400)
Squashed commit of the following:

commit 391fafa2b7a5e3678d582bea4223d887ba96f4e8
Author: Carter Waxman <cwaxman@cisco.com>
Date:   Wed Mar 14 15:27:42 2018 -0400

    detection: fixed uninitialized MpseStash

src/detection/fp_detect.cc

index a80003ccf9926c29af98a337ebabe4635597518e..dfb75728f615fb4d124be9b6f4c534bab5b4998f 100644 (file)
@@ -735,7 +735,10 @@ public:
     static const unsigned max = 32;
 
     void init()
-    { if ( enable ) { count = flushed = 0; } }
+    {
+        if ( enable )
+            count = flushed = 0;
+    }
 
     // this is done in the offload thread
     bool push(void* user, void* tree, int index, void* list);
@@ -1313,6 +1316,7 @@ void fp_offload(Packet* p)
 {
     IpsContext* c = p->context;
     MpseStash* stash = c->stash;
+    stash->enable_process();
     stash->init();
     stash->disable_process();
     init_match_info(c->otnx, true);