]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #1694 in SNORT/snort3 from ~MASHASAN/snort3:wizard_host_cache...
authorMike Stepanek (mstepane) <mstepane@cisco.com>
Tue, 30 Jul 2019 16:04:59 +0000 (12:04 -0400)
committerMike Stepanek (mstepane) <mstepane@cisco.com>
Tue, 30 Jul 2019 16:04:59 +0000 (12:04 -0400)
Squashed commit of the following:

commit 0c6bdabbfea675104681c4b13ed7ba33acd5344d
Author: Masud Hasan <mashasan@cisco.com>
Date:   Mon Jul 29 13:55:00 2019 -0400

    wizard: Avoiding host cache service insertion since we are using flow service

src/service_inspectors/wizard/wizard.cc

index 768adfb74bfd151af53a2be8e21b5957aec0e40c..2465d7c5c04ec5562eff7cee42187f4406ed5fad 100644 (file)
@@ -21,7 +21,6 @@
 #include "config.h"
 #endif
 
-#include "host_tracker/host_cache.h"
 #include "flow/flow.h"
 #include "log/messages.h"
 #include "profiler/profiler.h"
@@ -262,14 +261,7 @@ bool Wizard::spellbind(
     const MagicPage*& m, Flow* f, const uint8_t* data, unsigned len)
 {
     f->service = m->book.find_spell(data, len, m);
-
-    if ( f->service != nullptr )
-    {
-        host_cache[f->server_ip]->add_service(f->server_port, (IpProtocol)f->ip_proto);
-        return true;
-    }
-
-    return false;
+    return ( f->service != nullptr );
 }
 
 bool Wizard::cursebind(vector<CurseServiceTracker>& curse_tracker, Flow* f,
@@ -281,10 +273,7 @@ bool Wizard::cursebind(vector<CurseServiceTracker>& curse_tracker, Flow* f,
         {
             f->service = cst.curse->service.c_str();
             if ( f->service != nullptr )
-            {
-                host_cache[f->server_ip]->add_service(f->server_port, (IpProtocol)f->ip_proto);
                 return true;
-            }
         }
     }