]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #3959: dns: Updates to allow DNS to be compiled dynamically.
authorSteve Chew (stechew) <stechew@cisco.com>
Wed, 16 Aug 2023 14:23:53 +0000 (14:23 +0000)
committerSteve Chew (stechew) <stechew@cisco.com>
Wed, 16 Aug 2023 14:23:53 +0000 (14:23 +0000)
Merge in SNORT/snort3 from ~STECHEW/snort3:dynamic_dns to master

Squashed commit of the following:

commit 4c8cf55371d387e0b37b63d330cd776ca630ea09
Author: Steve Chew <stechew@cisco.com>
Date:   Tue Aug 15 22:42:25 2023 -0400

    dns: Updates to allow DNS to be compiled dynamically.

src/service_inspectors/dns/dns.cc
src/service_inspectors/service_inspectors.cc

index b874faa4e538dc0c6edc5a08f0bb9c934b9ee169..edfb55811669b7bbec3b639c7f6af8cb3995278a 100644 (file)
@@ -1210,6 +1210,10 @@ SO_PUBLIC const BaseApi* snort_plugins[] =
     nullptr
 };
 #else
-const BaseApi* sin_dns = &dns_api.base;
+const BaseApi* sin_dns[] =
+{
+    &dns_api.base,
+    nullptr
+};
 #endif
 
index 425811e2c36b9b6f2b4e4413b6a834b078d8e06c..1dbc53945805ebb2b34e2f3577632b3a402da78f 100644 (file)
@@ -32,10 +32,10 @@ extern const BaseApi* sin_http[];
 extern const BaseApi* sin_http2[];
 extern const BaseApi* sin_sip[];
 extern const BaseApi* sin_ssl[];
+extern const BaseApi* sin_dns[];
 
 #ifdef STATIC_INSPECTORS
 extern const BaseApi* sin_bo;
-extern const BaseApi* sin_dns;
 extern const BaseApi* sin_ftp_client;
 extern const BaseApi* sin_ftp_server;
 extern const BaseApi* sin_ftp_data;
@@ -63,7 +63,6 @@ const BaseApi* service_inspectors[] =
 {
 #ifdef STATIC_INSPECTORS
     sin_bo,
-    sin_dns,
     sin_ftp_client,
     sin_ftp_server,
     sin_ftp_data,
@@ -83,6 +82,7 @@ void load_service_inspectors()
 {
     PluginManager::load_plugins(service_inspectors);
 
+    PluginManager::load_plugins(sin_dns);
     PluginManager::load_plugins(sin_file);
     PluginManager::load_plugins(sin_http);
     PluginManager::load_plugins(sin_http2);