From: Ed Borgoyn Date: Tue, 12 Apr 2016 19:58:55 +0000 (-0400) Subject: HA-SC effort. X-Git-Tag: 3.0.0-233~433^2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca1bc8b19ac9632f066e97bcf659b009c4265ee2;p=thirdparty%2Fsnort3.git HA-SC effort. --- diff --git a/src/flow/ha.cc b/src/flow/ha.cc index 5f133dfcc..62c544752 100644 --- a/src/flow/ha.cc +++ b/src/flow/ha.cc @@ -111,12 +111,12 @@ bool FlowHAState::check(uint8_t state_mask) bool FlowHAState::is_critical() { - return ((state & CRITICAL) != 0); + return ((state & critical) != 0); } bool FlowHAState::is_major() { - return ((state & MAJOR) != 0); + return ((state & major) != 0); } void FlowHAState::config_lifetime(struct timeval min_lifetime) diff --git a/src/flow/ha.h b/src/flow/ha.h index 658bb701d..d31329a56 100644 --- a/src/flow/ha.h +++ b/src/flow/ha.h @@ -46,12 +46,18 @@ enum HAEvent HA_UPDATE_EVENT = 2 }; +enum HAEvent +{ + ha_delete_event = 1, + ha_update_event = 2 +}; + // Each active flow will have an associated FlowHAState instance. class FlowHAState { public: - static const uint8_t CRITICAL = 0x20; - static const uint8_t MAJOR = 0x10; + static const uint8_t critical = 0x20; + static const uint8_t major = 0x10; static const uint8_t CREATED = 0x01; static const uint8_t MODIFIED = 0x02; diff --git a/src/flow/ha_module.cc b/src/flow/ha_module.cc index e498dc7d5..0d363c7c7 100644 --- a/src/flow/ha_module.cc +++ b/src/flow/ha_module.cc @@ -89,7 +89,6 @@ bool HighAvailabilityModule::set(const char* fqn, Value& v, SnortConfig*) config.ports = new PortBitSet; v.get_bits(*(config.ports) ); } - else return false; diff --git a/src/side_channel/Makefile.am b/src/side_channel/Makefile.am index 8916fb13c..129df6cf9 100644 --- a/src/side_channel/Makefile.am +++ b/src/side_channel/Makefile.am @@ -11,3 +11,7 @@ if BUILD_UNIT_TESTS SUBDIRS = test endif +if BUILD_UNIT_TESTS +SUBDIRS = test +endif + diff --git a/src/stream/udp/udp_session.h b/src/stream/udp/udp_session.h index b19dd24a4..7f1befb95 100644 --- a/src/stream/udp/udp_session.h +++ b/src/stream/udp/udp_session.h @@ -21,13 +21,8 @@ #define UDP_SESSION_H #include -#include "flow/ha.h" #include "flow/session.h" -class UdpHAClient : public FlowHAClient -{ -}; - class UdpSession : public Session { public: