]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2227 in SNORT/snort3 from ~MASHASAN/snort3:host_cache_memcap_limi...
authorMasud Hasan (mashasan) <mashasan@cisco.com>
Tue, 2 Jun 2020 23:01:13 +0000 (23:01 +0000)
committerMasud Hasan (mashasan) <mashasan@cisco.com>
Tue, 2 Jun 2020 23:01:13 +0000 (23:01 +0000)
Squashed commit of the following:

commit fffeb145a3d8d5634cb4e26ed0f07b319ffcbf42
Author: Masud Hasan <mashasan@cisco.com>
Date:   Wed May 27 13:00:05 2020 -0400

    host_cache: Allowing module to accept 64 bit memcap value

src/host_tracker/host_cache_module.cc

index 9b72fdca398aac7c68a683b018cccab07b5611f0..ce962e47f2c8bb6f306838826461cc56b1cee912 100644 (file)
@@ -73,7 +73,7 @@ static const Parameter host_cache_params[] =
     { "dump_file", Parameter::PT_STRING, nullptr, nullptr,
       "file name to dump host cache on shutdown; won't dump by default" },
 
-    { "memcap", Parameter::PT_INT, "512:max32", "8388608",
+    { "memcap", Parameter::PT_INT, "512:maxSZ", "8388608",
       "maximum host cache size in bytes" },
 
     { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr }
@@ -88,7 +88,7 @@ bool HostCacheModule::set(const char*, Value& v, SnortConfig*)
         dump_file = snort_strdup(v.get_string());
     }
     else if ( v.is("memcap") )
-        hc_rrt.memcap = v.get_uint32();
+        hc_rrt.memcap = v.get_size();
     else
         return false;