void RejectAction::exec(Packet* p, const OptTreeNode* otn)
{
- p->active->update_reset_status(p, false);
+ p->active->set_delayed_action(Active::ACT_RESET, get_active_action());
+ p->active->set_drop_reason("ips");
+ p->active->reset_again();
+ p->active->update_status(p);
+
if ( otn )
Actions::alert(p, otn);
-
- p->active->reset_session(p, get_active_action(), false, true);
}
//-------------------------------------------------------------------------
// this is the current version of the base api
// must be prefixed to subtype version
-#define BASE_API_VERSION 11
+#define BASE_API_VERSION 12
// set options to API_OPTIONS to ensure compatibility
#ifndef API_OPTIONS
reset_session(p, &default_reset, force);
}
-void Active::update_reset_status(Packet* p, bool force)
+void Active::reset_session(Packet* p, ActiveAction* reject, bool force)
{
active_action = ACT_RESET;
update_status(p, force);
-}
-
-void Active::reset_session(Packet* p, ActiveAction* reject, bool force, bool skip_update_status)
-{
- if ( !skip_update_status )
- update_reset_status(p, force);
if ( force or (p->context->conf->inline_mode() and SFDAQ::forwarding_packet(p->pkth)) )
Stream::drop_flow(p);
void Active::set_delayed_action(ActiveActionType action, ActiveAction* act, bool force)
{
delayed_active_action = action;
- assert(delayed_reject == nullptr);
- delayed_reject = act;
+
+ if (delayed_reject == nullptr)
+ delayed_reject = act;
if ( force )
active_status = AST_FORCE;
const char* get_action_string() const
{ return act_str[active_action][active_status]; }
+ void update_status(const Packet*, bool force = false);
+
void drop_packet(const Packet*, bool force = false);
void daq_drop_packet(const Packet*);
bool retry_packet(const Packet*);
void trust_session(Packet*, bool force = false);
void block_session(Packet*, bool force = false);
void reset_session(Packet*, bool force = false);
- void reset_session(Packet*, snort::ActiveAction* r, bool force = false,
- bool skip_update_status = false);
- void update_reset_status(Packet*, bool force);
+ void reset_session(Packet*, snort::ActiveAction* r, bool force = false);
static void queue(snort::ActiveAction* a, snort::Packet* p);
static void clear_queue(snort::Packet*);
static int send_ip(DAQ_Msg_h, int, const uint8_t* buf, uint32_t len);
void update_status_actionable(const Packet*);
- void update_status(const Packet*, bool force = false);
void daq_update_status(const Packet*);
void block_session(const Packet*, ActiveActionType, bool force = false);