]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #607 in SNORT/snort3 from ha-binder to master
authorRuss Combs (rucombs) <rucombs@cisco.com>
Thu, 1 Sep 2016 17:37:40 +0000 (13:37 -0400)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Thu, 1 Sep 2016 17:37:40 +0000 (13:37 -0400)
Squashed commit of the following:

commit 34a3a1b3cdadf388af53e94c6e12bcc95660d257
Author: Ed Borgoyn <eborgoyn@cisco.com>
Date:   Wed Aug 24 19:57:54 2016 -0400

    Changes to binder.cc for HA

    Add Binder::eval(Flow*) to initialize Flow's created via received HA messages.

    Fix a failing UT and eliminate build warnings.

    Add the missing cmake binder UT support..

    Removed the Binder::eval(Flow*) and replaced by overloading the Binder::exec() method.

    Create binder.h to house a new enum for the Binder::exec() options.

    Refactor the exec() method into three functions,

24 files changed:
configure.ac
src/flow/ha.cc
src/flow/ha.h
src/flow/test/ha_test.cc
src/managers/inspector_manager.cc
src/network_inspectors/binder/CMakeLists.txt
src/network_inspectors/binder/Makefile.am
src/network_inspectors/binder/binder.cc
src/network_inspectors/binder/binder.h [new file with mode: 0644]
src/network_inspectors/binder/binding.h
src/network_inspectors/binder/dev_notes.txt
src/network_inspectors/binder/test/CMakeLists.txt [new file with mode: 0644]
src/network_inspectors/binder/test/Makefile.am [new file with mode: 0644]
src/network_inspectors/binder/test/binder_test.cc [new file with mode: 0644]
src/stream/base/stream_ha.cc
src/stream/base/stream_ha.h
src/stream/icmp/icmp_ha.cc
src/stream/icmp/icmp_ha.h
src/stream/ip/ip_ha.cc
src/stream/ip/ip_ha.h
src/stream/tcp/tcp_ha.cc
src/stream/tcp/tcp_ha.h
src/stream/udp/udp_ha.cc
src/stream/udp/udp_ha.h

index 1f9db1f1dc8a888b851417cbb972deaaaba05c03..c76f850b2f639a144399016b53b6e105653e6f7a 100644 (file)
@@ -1161,6 +1161,7 @@ src/network_inspectors/appid/Makefile \
 src/network_inspectors/appid/service_plugins/test/Makefile \
 src/network_inspectors/arp_spoof/Makefile \
 src/network_inspectors/binder/Makefile \
+src/network_inspectors/binder/test/Makefile \
 src/network_inspectors/normalize/Makefile \
 src/network_inspectors/packet_capture/Makefile \
 src/network_inspectors/perf_monitor/Makefile \
index 4cdd6eb057b4a9968fcad6c999b358820e15dcea..24664c11ed1b68b43fa1553f8aaee07d0a8e1d85 100644 (file)
@@ -388,7 +388,7 @@ static void consume_receive_update_message(HAMessage* msg)
         // client is always the first segment of the message, the consume()
         // invocation for the session client will create the flow.  This
         // flow can in turn be used by subsequent FlowHAClient's.
-        if ( !(*s_client_map)[header->client]->consume(&flow,&key,msg) )
+        if ( !(*s_client_map)[header->client]->consume(flow,&key,msg) )
         {
             ErrorMessage("Consuming HA Update message - error from client consume()\n");
             break;
index e2b3677f86c324fc7441f19026a36630576f8614..589a164c0db1042f9c8d4909354a9cf57b9bb5f3 100644 (file)
@@ -124,7 +124,7 @@ class FlowHAClient
 {
 public:
     virtual ~FlowHAClient() { }
-    virtual bool consume(Flow**, FlowKey*, HAMessage*) { return false; }
+    virtual bool consume(Flow*&, FlowKey*, HAMessage*) { return false; }
     virtual bool produce(Flow*, HAMessage*) { return false; }
     virtual bool is_update_required(Flow*) { return false; }
     virtual bool is_delete_required(Flow*) { return false; }
index 11933df57cdc4ad33b0b4c617949feab5abe2633..4eeab4a6d6a7b7e6254484621056911fac14039d 100644 (file)
@@ -89,7 +89,7 @@ class StreamHAClient : public FlowHAClient
 public:
     StreamHAClient() : FlowHAClient(10, true) { }
     ~StreamHAClient() { }
-    bool consume(Flow**, FlowKey*, HAMessage*)
+    bool consume(Flow*&, FlowKey*, HAMessage*)
     {
         s_stream_consume_called = true;
         return true;
@@ -113,7 +113,7 @@ class OtherHAClient : public FlowHAClient
 public:
     OtherHAClient() : FlowHAClient(5, false) { }
     ~OtherHAClient() { }
-    bool consume(Flow*, HAMessage*)
+    bool consume(Flow*&, HAMessage*)
     {
         s_other_consume_called = true;
         return true;
index eaa396026d84cd84f6a275a0a399d55f5ec70402..4ec76a382db6dcab216fd5ecd7282362b3cff21f 100644 (file)
@@ -35,6 +35,7 @@
 #include "packet_io/active.h"
 #include "target_based/snort_protocols.h"
 #include "binder/bind_module.h"
+#include "binder/binder.h"
 
 using namespace std;
 
@@ -747,7 +748,7 @@ void InspectorManager::bumble(Packet* p)
     Inspector* ins = get_binder();
 
     if ( ins )
-        ins->exec(0, flow);
+        ins->exec(BinderSpace::ExecOperation::HANDLE_GADGET, flow);
 
     flow->clear_clouseau();
 
index ad21cbd85e1250e1250ba869758e2b57560122ff..c3a73bb545ca0c5662ac31060926ea98ec3f26bd 100644 (file)
@@ -13,3 +13,5 @@ set(FILE_LIST
 #    add_shared_library(binder inspectors ${FILE_LIST})
 #    
 #endif (STATIC_INSPECTORS)
+
+add_subdirectory( test )
index c2b085125ae3f0a137b7e2f7ee7c048138485810..67b53ac5135146a86926f85736b4d97b54c7c22d 100644 (file)
@@ -16,3 +16,8 @@ libbinder_a_SOURCES = $(file_list)
 #libbinder_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -shared
 #libbinder_la_SOURCES = $(file_list)
 #endif
+
+if ENABLE_UNIT_TESTS
+SUBDIRS = test
+endif
+
index 00911fe022782412d67213c8ed98ba4ecc83d56b..e49034e9c69a0f3227ca0aaebf2181b15e283a1e 100644 (file)
@@ -17,6 +17,8 @@
 //--------------------------------------------------------------------------
 // binder.cc author Russ Combs <rucombs@cisco.com>
 
+#include "binder.h"
+
 #include <vector>
 using namespace std;
 
@@ -403,6 +405,8 @@ private:
     void get_bindings(Flow*, Stuff&);
     void apply(Flow*, Stuff&);
     Inspector* find_gadget(Flow*);
+    int exec_handle_gadget(void*);
+    int exec_eval_standby_flow(void*);
 
 private:
     vector<Binding*> bindings;
@@ -450,7 +454,7 @@ void Binder::eval(Packet* p)
     ++bstats.packets;
 }
 
-int Binder::exec(int, void* pv)
+int Binder::exec_handle_gadget( void* pv )
 {
     Flow* flow = (Flow*)pv;
     Inspector* ins = find_gadget(flow);
@@ -480,6 +484,32 @@ int Binder::exec(int, void* pv)
     return 0;
 }
 
+// similar to eval(), but working on a Flow in HA Standby mode
+int Binder::exec_eval_standby_flow( void* pv )
+{
+    Flow* flow = (Flow*)pv;
+
+    Stuff stuff;
+    get_bindings(flow, stuff);
+    apply(flow, stuff);
+
+    ++bstats.verdicts[stuff.action];
+    return 0;
+}
+int Binder::exec(int operation, void* pv)
+{
+    switch( operation )
+    {
+        case BinderSpace::ExecOperation::HANDLE_GADGET:
+            return exec_handle_gadget( pv );
+        case BinderSpace::ExecOperation::EVAL_STANDBY_FLOW:
+            return exec_eval_standby_flow( pv );
+        default:
+            return (-1);
+    }
+}
+
 //-------------------------------------------------------------------------
 // implementation stuff
 //-------------------------------------------------------------------------
diff --git a/src/network_inspectors/binder/binder.h b/src/network_inspectors/binder/binder.h
new file mode 100644 (file)
index 0000000..956b573
--- /dev/null
@@ -0,0 +1,30 @@
+//--------------------------------------------------------------------------
+// Copyright (C) 2016-2016 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 published
+// by the Free Software Foundation.  You may not use, modify or distribute
+// this program under any other version of the GNU General Public License.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+//--------------------------------------------------------------------------
+
+// binder.h author Ed Borgoyn <eborgoyn@cisco.com>
+
+#ifndef BINDER_H
+#define BINDER_H
+
+namespace BinderSpace
+{
+    enum ExecOperation : int { HANDLE_GADGET, EVAL_STANDBY_FLOW };
+}
+
+#endif
+
index d72771289f79032abb2736ff6ea0e8251306863a..69fef16424cb7eb89b821891231ec7ea62dc0347 100644 (file)
@@ -17,8 +17,8 @@
 //--------------------------------------------------------------------------
 // binder.cc author Russ Combs <rucombs@cisco.com>
 
-#ifndef BINDER_H
-#define BINDER_H
+#ifndef BINDING_H
+#define BINDING_H
 
 #include <string>
 
index 0d4e3b13d43b902188422d2cdca25de36badc5b8..4793458e48126402a0e063df1b435b1b93aa33a7 100644 (file)
@@ -25,3 +25,4 @@ file) that has its own binder, and so on.
 The implementation is not yet optimized for performance.  A faster method
 of searching for applicable bindings should be developed.
 
+The exec() method implements specialized Inspector::Binder functionality.
diff --git a/src/network_inspectors/binder/test/CMakeLists.txt b/src/network_inspectors/binder/test/CMakeLists.txt
new file mode 100644 (file)
index 0000000..2f3e55a
--- /dev/null
@@ -0,0 +1,9 @@
+set (
+    BINDER_TEST_LIBS
+    flow
+    framework
+    stream
+    stream_paf
+)
+
+add_cpputest(binder_test binder ${BINDER_TEST_LIBS})
diff --git a/src/network_inspectors/binder/test/Makefile.am b/src/network_inspectors/binder/test/Makefile.am
new file mode 100644 (file)
index 0000000..ed33a6d
--- /dev/null
@@ -0,0 +1,17 @@
+
+AM_DEFAULT_SOURCE_EXT = .cc
+
+check_PROGRAMS = \
+binder_test
+
+TESTS = $(check_PROGRAMS)
+
+binder_test_CPPFLAGS = @AM_CPPFLAGS@ @CPPUTEST_CPPFLAGS@
+
+binder_test_LDADD = \
+../../../flow/libflow.a \
+../../../framework/libframework.a \
+../../../stream/libstream.a \
+../../../stream/libstream_paf.a \
+@CPPUTEST_LDFLAGS@
+
diff --git a/src/network_inspectors/binder/test/binder_test.cc b/src/network_inspectors/binder/test/binder_test.cc
new file mode 100644 (file)
index 0000000..2ed484d
--- /dev/null
@@ -0,0 +1,162 @@
+//--------------------------------------------------------------------------
+// Copyright (C) 2015-2016 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 published
+// by the Free Software Foundation.  You may not use, modify or distribute
+// this program under any other version of the GNU General Public License.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+//--------------------------------------------------------------------------
+
+// binder_test.cc author Ed Borgoyn <eborgoyn@cisco.com>
+// unit test main
+
+#include "network_inspectors/binder/binder.cc"
+#include "network_inspectors/binder/bind_module.h"
+
+#include <thread>
+#include <vector>
+
+#include "flow/flow.h"
+#include "framework/inspector.h"
+#include "managers/inspector_manager.h"
+#include "main/policy.h"
+#include "profiler/profiler.h"
+#include "stream/stream_api.h"
+#include "stream/stream_splitter.h"
+#include "utils/stats.h"
+
+#include <CppUTest/CommandLineTestRunner.h>
+#include <CppUTest/TestHarness.h>
+
+THREAD_LOCAL SnortConfig* snort_conf = nullptr;
+THREAD_LOCAL BindStats bstats;
+static const PegInfo bind_pegs[] = { { nullptr, nullptr } };
+
+static std::vector<Binding*> s_bindings;
+
+static sfip_t s_src_ip, s_dst_ip;
+static Inspector* s_inspector;
+
+void show_stats(PegCount*, const PegInfo*, unsigned, const char*) { }
+void show_stats(PegCount*, const PegInfo*, IndexVec&, const char*) { }
+void show_stats(PegCount*, const PegInfo*, IndexVec&, const char*, FILE*) { }
+
+void sfvar_free(sfip_var_t*) {}
+int sfvar_ip_in(sfip_var_t*, const sfip_t*) { return 0; }
+SO_PUBLIC Inspector* InspectorManager::get_inspector(const char*, bool) { return s_inspector; }
+InspectorType InspectorManager::get_type(const char*) { return InspectorType::IT_BINDER; }
+Inspector* InspectorManager::get_binder() { return nullptr; }
+
+BinderModule::BinderModule() : Module("B", "B Help", nullptr, true) { }
+BinderModule::~BinderModule() { }
+ProfileStats* BinderModule::get_profile() const { return nullptr; }
+bool BinderModule::set( const char*, Value&, SnortConfig* ) { return true; }
+bool BinderModule::begin( const char*, int, SnortConfig* ) { return true; }
+bool BinderModule::end( const char*, int, SnortConfig* ) { return true; }
+
+std::vector<Binding*>& BinderModule::get_data() { return s_bindings; }
+const PegInfo* BinderModule::get_pegs() const { return bind_pegs; }
+PegCount* BinderModule::get_counts() const { return (PegCount*)&bstats; }
+
+Inspector::Inspector()
+{
+    ref_count = new unsigned[1];
+    ref_count[0] = 0;
+}
+Inspector::~Inspector()
+{
+    delete[] ref_count;
+}
+
+class MyInspector : public Inspector
+{
+    void eval(Packet*) { }
+};
+
+bool Inspector::get_buf(const char*, Packet*, InspectionBuffer&) { return false; }
+StreamSplitter* Inspector::get_splitter(bool) { return nullptr; }
+bool Inspector::likes(Packet*) { return false; }
+unsigned THREAD_LOCAL Inspector::slot = 0;
+
+void ParseError(const char*, ...) { }
+void LogMessage(const char*,...) { }
+
+void Stream::set_application_protocol_id_from_host_entry(Flow*, HostAttributeEntry const*, int) { }
+void Stream::set_splitter(Flow*, bool, class StreamSplitter*) { }
+const char* get_protocol_name(uint16_t) { return ""; }
+int16_t FindProtocolReference(const char*) { return 0; }
+void set_policies(SnortConfig*, unsigned) { }
+HostAttributeEntry* SFAT_LookupHostEntryByIP(const sfip_t*) { return nullptr; }
+
+Flow::Flow() { }
+Flow::~Flow() { }
+
+extern const BaseApi* nin_binder;
+
+TEST_GROUP(binder)
+{
+    void setup()
+    {
+    }
+    void teardown()
+    {
+    }
+};
+
+TEST(binder, exec)
+{
+    uint8_t* conf = new uint8_t[sizeof(SnortConfig)];
+    memset(conf,0,sizeof(SnortConfig));
+    snort_conf = (SnortConfig*)conf;
+    Flow* flow = new Flow;
+    constexpr size_t offset = offsetof(Flow, appDataList);
+    memset((uint8_t*)flow+offset, 0, sizeof(Flow)-offset);
+
+    s_inspector = new MyInspector();
+
+    flow->pkt_type = PktType::UDP;
+    flow->key = nullptr;
+    flow->session = nullptr;
+    flow->clouseau = nullptr;
+    flow->gadget = nullptr;
+    flow->ssn_client = nullptr;
+    flow->ssn_server = nullptr;
+    flow->key = new FlowKey;
+    ((FlowKey*)flow->key)->init(PktType::UDP, IpProtocol::UDP, &s_src_ip, (uint16_t)10, &s_dst_ip, (uint16_t)11, 0, 0, 0);
+    InspectApi* api = (InspectApi*)nin_binder;
+    CHECK(api != nullptr );
+    BinderModule* m = (BinderModule*)(api->base.mod_ctor());
+    CHECK(m != nullptr );
+    Binding* binding = new Binding;
+    binding->when.protos = (unsigned)PktType::UDP;
+    binding->use.type = "wizard";
+    binding->use.name = "wizard";
+    s_bindings.push_back(binding);
+    Binder* b = (Binder*)api->ctor(m);
+    CHECK(b != nullptr );
+    b->configure(snort_conf);
+    b->exec(BinderSpace::ExecOperation::EVAL_STANDBY_FLOW,(Flow*)flow);
+    CHECK(flow->ssn_client != nullptr);
+    CHECK(flow->ssn_server != nullptr);
+    api->dtor(b);
+    api->base.mod_dtor(m);
+    delete flow->key;
+    delete flow;
+    delete s_inspector;
+    delete[] conf;
+}
+
+int main(int argc, char** argv)
+{
+    return CommandLineTestRunner::RunAllTests(argc, argv);
+}
+
index 257b55c1db408f78997cfb0a164279c8807754f3..1f681ed99061ca1943c353185afa104f1450540b 100644 (file)
@@ -22,7 +22,9 @@
 #include <thread>
 #include <unordered_map>
 
+#include "binder/binder.h"
 #include "main/snort_debug.h"
+#include "managers/inspector_manager.h"
 #include "sfip/sf_ip.h"
 #include "stream/stream_api.h"
 
@@ -82,11 +84,10 @@ static bool is_client_lower(Flow* flow)
     return false;
 }
 
-bool StreamHAClient::consume(Flow** flow, FlowKey* key, HAMessage* msg)
+bool StreamHAClient::consume(Flow*& flow, FlowKey* key, HAMessage* msg)
 {
     DebugMessage(DEBUG_HA,"StreamHAClient::consume()\n");
 
-    assert(flow); // but *flow could be nullptr
     assert(key);
     assert(msg);
 
@@ -99,36 +100,39 @@ bool StreamHAClient::consume(Flow** flow, FlowKey* key, HAMessage* msg)
     msg->cursor += sizeof(SessionHAContent);
 
     // If flow is missing, we need to create a new one.
-    if ( *flow == nullptr )
+    if ( flow == nullptr )
     {
         // A nullptr indicates that the protocol has no handler
-        if ( (*flow = protocol_create_session(key)) == nullptr )
+        if ( (flow = protocol_create_session(key)) == nullptr )
             return false;
-        (*flow)->ha_state->clear(FlowHAState::NEW);
+        Inspector* b = InspectorManager::get_binder();
+        if ( b != nullptr )
+            b->exec(BinderSpace::ExecOperation::EVAL_STANDBY_FLOW,(void*)flow);
+        flow->ha_state->clear(FlowHAState::NEW);
         int family = (hac->flags & SessionHAContent::FLAG_IP6) ? AF_INET6 : AF_INET;
         if ( hac->flags & SessionHAContent::FLAG_LOW )
         {
-            sfip_set_raw(&((*flow)->server_ip), (*flow)->key->ip_l, family);
-            sfip_set_raw(&((*flow)->client_ip), (*flow)->key->ip_h, family);
-            (*flow)->server_port = (*flow)->key->port_l;
-            (*flow)->client_port = (*flow)->key->port_h;
+            sfip_set_raw(&(flow->server_ip), flow->key->ip_l, family);
+            sfip_set_raw(&(flow->client_ip), flow->key->ip_h, family);
+            flow->server_port = flow->key->port_l;
+            flow->client_port = flow->key->port_h;
         }
         else
         {
-            sfip_set_raw(&((*flow)->client_ip), (*flow)->key->ip_l, family);
-            sfip_set_raw(&((*flow)->server_ip), (*flow)->key->ip_h, family);
-            (*flow)->client_port = (*flow)->key->port_l;
-            (*flow)->server_port = (*flow)->key->port_h;
+            sfip_set_raw(&(flow->client_ip), flow->key->ip_l, family);
+            sfip_set_raw(&(flow->server_ip), flow->key->ip_h, family);
+            flow->client_port = flow->key->port_l;
+            flow->server_port = flow->key->port_h;
         }
     }
 
-    (*flow)->ssn_state = hac->ssn_state;
-    (*flow)->flow_state = hac->flow_state;
+    flow->ssn_state = hac->ssn_state;
+    flow->flow_state = hac->flow_state;
 
-    if ( !(*flow)->ha_state->check_any(FlowHAState::STANDBY) )
+    if ( !flow->ha_state->check_any(FlowHAState::STANDBY) )
     {
-        protocol_deactivate_session(*flow);
-        (*flow)->ha_state->add(FlowHAState::STANDBY);
+        protocol_deactivate_session(flow);
+        flow->ha_state->add(FlowHAState::STANDBY);
     }
 
     return true;
index 0526e13f1eb2dfc5129bc4337b23f3e54cc73ceb..8696a5865824d3e398fa9c941c353a58e748caf9 100644 (file)
@@ -40,7 +40,7 @@ class StreamHAClient : public FlowHAClient
 {
 public:
     StreamHAClient() : FlowHAClient(sizeof(SessionHAContent), true) { }
-    bool consume(Flow**, FlowKey*, HAMessage*);
+    bool consume(Flow*&, FlowKey*, HAMessage*);
     bool produce(Flow*, HAMessage*);
     bool is_update_required(Flow*);
     bool is_delete_required(Flow*);
index 31bc20e8fea31c34ef921523edf496306f9cc55f..a8864f6d2e69ca93f716c96c879758a154d0f342 100644 (file)
 #include "stream/icmp/icmp_session.h"
 #include "stream/stream.h"
 
-void IcmpHA::delete_session(Flow*)
-{
-    DebugMessage(DEBUG_HA,"IcmpHA::delete_session)\n");
-}
-
 Flow* IcmpHA::create_session(FlowKey* key)
 {
     DebugMessage(DEBUG_HA,"IcmpHA::create_session\n");
index 20019f875024b46d0de03addf47050f84f28815c..844a4ded83fcefda38c03c5e756885d22cdf9648 100644 (file)
@@ -31,7 +31,6 @@ class IcmpHA : public ProtocolHA
 {
 public:
     IcmpHA() : ProtocolHA(PktType::ICMP) { }
-    void delete_session(Flow*);
     Flow* create_session(FlowKey*);
 
 private:
index 700d7ad51fdb4bb1672c04578393301b4fe0216e..c88d26374b4bcfc6a22bede99bcdd6afa1b5d202 100644 (file)
 #include "main/snort_debug.h"
 #include "stream/ip/ip_session.h"
 
-void IpHA::delete_session(Flow*)
-{
-    DebugMessage(DEBUG_HA,"IpHA::delete_session)\n");
-}
-
 Flow* IpHA::create_session(FlowKey* key)
 {
     DebugMessage(DEBUG_HA,"IpHA::create_session\n");
index 6e60245a95da885564a7761a9eb2c3720b6faeea..0987b9db8176832312e0aabd3783b878ae9e94d6 100644 (file)
@@ -31,7 +31,6 @@ class IpHA : public ProtocolHA
 {
 public:
     IpHA() : ProtocolHA(PktType::IP) { }
-    void delete_session(Flow*);
     Flow* create_session(FlowKey*);
 
 private:
index 563df0238617ef3b20aac79918de122c650fe8bd..ad2c394a6381d174801722dbffb0ab0008072d9e 100644 (file)
 #include "main/snort_debug.h"
 #include "stream/tcp/tcp_session.h"
 
-void TcpHA::delete_session(Flow*)
-{
-    DebugMessage(DEBUG_HA,"TcpHA::delete_session)\n");
-}
-
 Flow* TcpHA::create_session(FlowKey* key)
 {
     DebugMessage(DEBUG_HA,"TcpHA::create_session)\n");
index cdb15dea5f2cfe7f23119d507ac1cd3968dddf14..b470957a2bb96aaf2531d4adeab86b8cedfdc183 100644 (file)
@@ -31,7 +31,6 @@ class TcpHA : public ProtocolHA
 {
 public:
     TcpHA() : ProtocolHA(PktType::TCP) { }
-    void delete_session(Flow*);
     Flow* create_session(FlowKey*);
     void deactivate_session(Flow*);
 
index 5a7f4614a1f9130654fdb1b17512b57182a94fc0..d2df14eb0c6309d8482fb60adf962c60e1ca41af 100644 (file)
 
 extern THREAD_LOCAL class FlowControl* flow_con;
 
-void UdpHA::delete_session(Flow*)
-{
-    DebugMessage(DEBUG_HA,"UdpHA::delete_session\n");
-}
-
 Flow* UdpHA::create_session(FlowKey* key)
 {
     DebugMessage(DEBUG_HA,"UdpHA::create_session\n");
index dc628dbac26cbab0a83ea9220dddc069485aab90..d7578871e5f5d9b33f8b18ab1925258e209c7b7a 100644 (file)
@@ -31,7 +31,6 @@ class UdpHA : public ProtocolHA
 {
 public:
     UdpHA() : ProtocolHA(PktType::UDP) { }
-    void delete_session(Flow*);
     Flow* create_session(FlowKey*);
 
 private: