From: Bhagya Tholpady (bbantwal) Date: Fri, 23 Oct 2020 10:54:45 +0000 (+0000) Subject: Merge pull request #2563 in SNORT/snort3 from ~OSHUMEIK/snort3:module_of_list_type... X-Git-Tag: 3.0.3-4~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1d6cf6359fe372e930ebfc95a1b1d80e20f82f5;p=thirdparty%2Fsnort3.git Merge pull request #2563 in SNORT/snort3 from ~OSHUMEIK/snort3:module_of_list_type to master Squashed commit of the following: commit 11e56a92ba84f1a3dfb8c7a5a370a889207fe9fc Author: Oleksii Shumeiko Date: Tue Oct 20 16:14:22 2020 +0300 module: fix modules that accept their configuration as a list The following modules accept their configuration as a list: FileConnectorModule TcpConnectorModule SideChannelModule commit 683ba5fc7849a3e92991634e4a3f5e34180fb069 Author: Oleksii Shumeiko Date: Wed Oct 21 14:29:36 2020 +0300 framework: fix ConnectorConfig dtor to be virtual --- diff --git a/src/connectors/file_connector/file_connector_module.cc b/src/connectors/file_connector/file_connector_module.cc index d102ee1ab..c65c38ed8 100644 --- a/src/connectors/file_connector/file_connector_module.cc +++ b/src/connectors/file_connector/file_connector_module.cc @@ -57,7 +57,7 @@ extern THREAD_LOCAL ProfileStats file_connector_perfstats; //------------------------------------------------------------------------- FileConnectorModule::FileConnectorModule() : - Module(FILE_CONNECTOR_NAME, FILE_CONNECTOR_HELP, file_connector_params) + Module(FILE_CONNECTOR_NAME, FILE_CONNECTOR_HELP, file_connector_params, true) { config = nullptr; config_set = new FileConnectorConfig::FileConnectorConfigSet; diff --git a/src/connectors/tcp_connector/tcp_connector_module.cc b/src/connectors/tcp_connector/tcp_connector_module.cc index d99c18979..f904e0287 100644 --- a/src/connectors/tcp_connector/tcp_connector_module.cc +++ b/src/connectors/tcp_connector/tcp_connector_module.cc @@ -57,7 +57,7 @@ extern THREAD_LOCAL ProfileStats tcp_connector_perfstats; //------------------------------------------------------------------------- TcpConnectorModule::TcpConnectorModule() : - Module(TCP_CONNECTOR_NAME, TCP_CONNECTOR_HELP, tcp_connector_params) + Module(TCP_CONNECTOR_NAME, TCP_CONNECTOR_HELP, tcp_connector_params, true) { config = nullptr; config_set = new TcpConnectorConfig::TcpConnectorConfigSet; diff --git a/src/framework/connector.h b/src/framework/connector.h index c27e85d63..85ea15759 100644 --- a/src/framework/connector.h +++ b/src/framework/connector.h @@ -86,6 +86,8 @@ public: typedef std::vector ConfigSet; Connector::Direction direction; std::string connector_name; + + virtual ~ConnectorConfig() = default; }; class SO_PUBLIC ConnectorCommon diff --git a/src/side_channel/side_channel_module.cc b/src/side_channel/side_channel_module.cc index d0c17a350..2e649bcb4 100644 --- a/src/side_channel/side_channel_module.cc +++ b/src/side_channel/side_channel_module.cc @@ -88,7 +88,7 @@ static bool validate_config(SideChannelConfig* config) } SideChannelModule::SideChannelModule() : - Module(SIDECHANNEL_NAME, SIDECHANNEL_HELP, sc_params){} + Module(SIDECHANNEL_NAME, SIDECHANNEL_HELP, sc_params, true){} ProfileStats* SideChannelModule::get_profile() const { return &sc_perf_stats; }