]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2563 in SNORT/snort3 from ~OSHUMEIK/snort3:module_of_list_type...
authorBhagya Tholpady (bbantwal) <bbantwal@cisco.com>
Fri, 23 Oct 2020 10:54:45 +0000 (10:54 +0000)
committerBhagya Tholpady (bbantwal) <bbantwal@cisco.com>
Fri, 23 Oct 2020 10:54:45 +0000 (10:54 +0000)
Squashed commit of the following:

commit 11e56a92ba84f1a3dfb8c7a5a370a889207fe9fc
Author: Oleksii Shumeiko <oshumeik@cisco.com>
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 <oshumeik@cisco.com>
Date:   Wed Oct 21 14:29:36 2020 +0300

    framework: fix ConnectorConfig dtor to be virtual

src/connectors/file_connector/file_connector_module.cc
src/connectors/tcp_connector/tcp_connector_module.cc
src/framework/connector.h
src/side_channel/side_channel_module.cc

index d102ee1ab30fdf8d9a714a571ea70a679c249e3d..c65c38ed8273ce0847ea76e49afbd502b81a039e 100644 (file)
@@ -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;
index d99c18979a78e28af5c88cc2f9d11960601723d5..f904e0287c27a4ea0f655e19c81235e41586d374 100644 (file)
@@ -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;
index c27e85d6362069151e5cceae3b3a1e9790a3b8f3..85ea15759ebc7ccc3c0a3f2d5af139f71053f271 100644 (file)
@@ -86,6 +86,8 @@ public:
     typedef std::vector<ConnectorConfig*> ConfigSet;
     Connector::Direction direction;
     std::string connector_name;
+
+    virtual ~ConnectorConfig() = default;
 };
 
 class SO_PUBLIC ConnectorCommon
index d0c17a350f7117f507d3a9277de2ea80b02d413c..2e649bcb4abc8b6dddebd4c8cc67038efe4722b6 100644 (file)
@@ -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; }