Squashed commit of the following:
commit
46f3ef78a578553e2eedb7f4da91a366b55967fd
Author: Silviu Minut <sminut@cisco.com>
Date: Wed Feb 19 14:09:50 2020 -0500
file_api: enable Active only when idx = 0 and misc style edits.
#include "main/snort_config.h"
#include "main/snort_debug.h"
#include "managers/action_manager.h"
+#include "packet_io/active.h"
#include "packet_tracer/packet_tracer.h"
#include "parser/parser.h"
-#include "packet_io/active.h"
#include "profiler/profiler_defs.h"
#include "protocols/icmp4.h"
#include "protocols/packet_manager.h"
// rule actions are queued here (eg reject)
if ( rtn->listhead->is_plugin_action )
{
- snort::Actions::Type idx = rtn->listhead->ruleListNode->mode;
+ Actions::Type idx = rtn->listhead->ruleListNode->mode;
ActiveAction * act = get_ips_policy()->action[idx];
if ( act )
Active::queue(act, p);
bool FileIdModule::end(const char* fqn, int idx, SnortConfig*)
{
if (!idx)
+ {
+ if ( need_active )
+ Active::set_enabled();
return true;
+ }
if ( !strcmp(fqn, "file_id.file_rules") )
{
fc->process_file_policy_rule(file_rule);
}
- if ( need_active )
- Active::set_enabled();
-
return true;
}
// The plugin actions (e.g. reject, react, etc.) are per policy, per mode.
// At logging time, they have to be retrieved the way we store them here.
IpsPolicy* ips = get_ips_policy();
- snort::Actions::Type idx = rln->mode;
+ Actions::Type idx = rln->mode;
assert(ips->action[idx] == nullptr);
ips->action[idx] = act;
return new IpsActionWrapper(api, p);
}
-
#endif
#endif
#include "active.h"
-#include "active_action.h"
#include "detection/detection_engine.h"
#include "log/messages.h"
#include "stream/stream.h"
#include "utils/dnet_header.h"
+#include "active_action.h"
#include "sfdaq.h"
#include "sfdaq_instance.h"
#include "sfdaq_module.h"
//--------------------------------------------------------------------------
-// Copyright (C) 2014-2020 Cisco and/or its affiliates. All rights reserved.
+// Copyright (C) 2020-2020 Cisco and/or its affiliates. All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License Version 2 as published