From: Russ Combs Date: Thu, 9 Oct 2014 02:58:55 +0000 (-0400) Subject: more tweaks X-Git-Tag: 3.0.0-233~1383^2~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=919296a8198dab10d2fdbcfc9cc2e409e772e48a;p=thirdparty%2Fsnort3.git more tweaks --- diff --git a/ChangeLog b/ChangeLog index d784e0687..c60dc3d76 100644 --- 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 diff --git a/src/managers/inspector_manager.cc b/src/managers/inspector_manager.cc index c4540abbb..815aabfb8 100644 --- a/src/managers/inspector_manager.cc +++ b/src/managers/inspector_manager.cc @@ -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 ) { diff --git a/src/managers/module_manager.cc b/src/managers/module_manager.cc index 2664ca123..485ce4aed 100644 --- a/src/managers/module_manager.cc +++ b/src/managers/module_manager.cc @@ -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; } diff --git a/src/stream/icmp/icmp_session.cc b/src/stream/icmp/icmp_session.cc index 15c106a03..6356be716 100644 --- a/src/stream/icmp/icmp_session.cc +++ b/src/stream/icmp/icmp_session.cc @@ -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; } diff --git a/src/stream/icmp/stream_icmp.cc b/src/stream/icmp/stream_icmp.cc index 703aba1c9..bb52315c0 100644 --- a/src/stream/icmp/stream_icmp.cc +++ b/src/stream/icmp/stream_icmp.cc @@ -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 #ifdef HAVE_CONFIG_H #include "config.h"