Merge in SNORT/snort3 from ~RDEMPSTE/snort3:block_flow_state to master
Squashed commit of the following:
commit
fc47b9301b9d235d493929d0eb746cab06eef574
Author: Ron Dempster (rdempste) <rdempste@cisco.com>
Date: Tue Oct 8 11:38:49 2024 -0400
packet_io: set the flow state to block when forcing the session block
// disable all preproc analysis and detection for this packet
DetectionEngine::disable_all(p);
act->block_session(p, true);
- if (p->flow)
- p->flow->set_state(Flow::FlowState::BLOCK);
act->set_drop_reason("reputation");
reputationstats.blocked++;
if (PacketTracer::is_active())
if ( force or (p->context->conf->ips_inline_mode() and SFDAQ::forwarding_packet(p->pkth)))
Stream::block_flow(p);
+ if ( force and p->flow )
+ p->flow->set_state(Flow::FlowState::BLOCK);
+
p->disable_inspect = true;
}
DetectionEngine::disable_all(p);
- if ( p->flow )
- p->flow->set_state(Flow::FlowState::BLOCK);
-
return status;
}
return 1;
}
-void Active::block_session(snort::Packet*, bool) { }
+void Active::block_session(snort::Packet* p, bool force)
+{
+ if (force and p->flow)
+ p->flow->set_state(Flow::FlowState::BLOCK);
+}
void DetectionEngine::disable_all(snort::Packet*) { }
Flow::~Flow() = default;
IpsContext::IpsContext(unsigned int) { }