return APP_ID_NONE;
}
+void HostTracker::remove_inferred_services()
+{
+ std::lock_guard<std::mutex> lck(host_tracker_lock);
+ for ( auto s = services.begin(); s != services.end(); )
+ {
+ if (s->inferred_appid)
+ s = services.erase(s);
+ else
+ s++;
+ }
+}
+
static inline string to_time_string(uint32_t p_time)
{
time_t raw_time = (time_t) p_time;
AppId get_appid(Port port, IpProtocol proto, bool inferred_only = false, bool allow_port_wildcard = false);
+ void remove_inferred_services();
+
// This should be updated whenever HostTracker data members are changed
void stringify(std::string& str);
#include <climits>
#include <lua.hpp>
+#include "host_tracker/host_cache.h"
#include "log/messages.h"
#include "main/analyzer_command.h"
#include "main/snort.h"
return 0;
}
+static void clear_dynamic_host_cache_services()
+{
+ auto hosts = host_cache.get_all_data();
+ for ( auto& h : hosts )
+ {
+ h.second->remove_inferred_services();
+ }
+}
+
static int reload_odp(lua_State* L)
{
bool from_shell = ( L != nullptr );
AppIdContext& ctxt = inspector->get_ctxt();
OdpContext& old_odp_ctxt = ctxt.get_odp_ctxt();
+ clear_dynamic_host_cache_services();
AppIdPegCounts::cleanup_peg_info();
LuaDetectorManager::clear_lua_detector_mgrs();
ctxt.create_odp_ctxt();