]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
more tweaks
authorRuss Combs <rucombs@cisco.com>
Thu, 9 Oct 2014 02:58:55 +0000 (22:58 -0400)
committerRuss Combs <rucombs@cisco.com>
Thu, 9 Oct 2014 02:58:55 +0000 (22:58 -0400)
ChangeLog
src/managers/inspector_manager.cc
src/managers/module_manager.cc
src/stream/icmp/icmp_session.cc
src/stream/icmp/stream_icmp.cc

index d784e068754b21304733bb87b3fb0991e14f032e..c60dc3d76f3fae7afbedff4517bcd4c52e9f009e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,7 @@
 -- added --warn-flowbits
 -- tweaked flowbits counts start up output
 -- updates to snort.lua and snort_defaults.lua
+-- fixed stream_icmp counts
 
 123
 -- refactored documentation
index c4540abbbf1cd2ba321d1205538288a19c510d09..815aabfb8367ae420eaaca3d42503f8f4a3dd68a 100644 (file)
@@ -251,11 +251,14 @@ void InspectorManager::release_plugins ()
 {
     empty_trash();
 
+#if 0
+    // FIXIT-H multiple policies causes ref_counts > 0
     for ( auto* p : s_trash )
     {
         if ( !p->is_inactive() )
             printf("%s = %u\n", p->get_api()->base.name, p->get_ref(0));
     }
+#endif
 
     for ( auto* p : s_handlers )
     {
index 2664ca123f3bae33470b9ae99419a2d387437429..485ce4aed24dfb4600d644a5eda6893f9ab05017 100644 (file)
@@ -350,13 +350,11 @@ static bool set_value(const char* fqn, Value& v)
  
     if ( !p )
     {
-        if ( key == mod->get_name() )
-            // handle things like x = { 1 }
-            // where x is a table not a list and 1 should be 
-            // considered a key not a value
-            ParseError("can't find %s.%s", fqn, v.get_as_string());
-        else
-            ParseError("can't find %s", fqn);
+        // FIXIT-L handle things like x = { 1 }
+        // where x is a table not a list and 1 should be 
+        // considered a key not a value; ideally say
+        // can't find x.1 instead of just can't find x
+        ParseError("can't find %s", fqn);
         ++s_errors;
         return false;
     }
index 15c106a0319acedeba261a51c92b79d563030f45..6356be7169849386ab241560f14ed65293f9243c 100644 (file)
@@ -195,6 +195,7 @@ static int ProcessIcmpUnreach(Packet *p)
 IcmpSession::IcmpSession(Flow* flow) : Session(flow)
 {
     setup(nullptr);
+    icmpStats.created--;
 }
 
 bool IcmpSession::setup(Packet*)
@@ -202,6 +203,7 @@ bool IcmpSession::setup(Packet*)
     echo_count = 0;
     ssn_time.tv_sec = 0;
     ssn_time.tv_usec = 0;
+    icmpStats.created++;
     return true;
 }
 
index 703aba1c92af3e07b65ee96fed55086e65da08a9..bb52315c0ba9d05ffb82dcca01529caa5a502899 100644 (file)
@@ -1,7 +1,6 @@
 /****************************************************************************
  *
-** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
- * Copyright (C) 2005-2013 Sourcefire, Inc.
+ * Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License Version 2 as
@@ -19,6 +18,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
  ****************************************************************************/
+// stream_icmp.cc author Russ Combs <rucombs@cisco.com>
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"