From: Masud Hasan (mashasan) Date: Tue, 2 Jun 2020 23:01:13 +0000 (+0000) Subject: Merge pull request #2227 in SNORT/snort3 from ~MASHASAN/snort3:host_cache_memcap_limi... X-Git-Tag: 3.0.1-5~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ac751c5d8806bf8b5e72ba5ef73e18e8e9db95d;p=thirdparty%2Fsnort3.git Merge pull request #2227 in SNORT/snort3 from ~MASHASAN/snort3:host_cache_memcap_limit to master Squashed commit of the following: commit fffeb145a3d8d5634cb4e26ed0f07b319ffcbf42 Author: Masud Hasan Date: Wed May 27 13:00:05 2020 -0400 host_cache: Allowing module to accept 64 bit memcap value --- diff --git a/src/host_tracker/host_cache_module.cc b/src/host_tracker/host_cache_module.cc index 9b72fdca3..ce962e47f 100644 --- a/src/host_tracker/host_cache_module.cc +++ b/src/host_tracker/host_cache_module.cc @@ -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;