From: Russ Combs Date: Mon, 1 Dec 2014 20:29:25 +0000 (-0500) Subject: move enforcement of block from binder to flow_control (where it belongs) X-Git-Tag: 3.0.0-233~1146^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a31a0edba1bb2674846b5236bbfa6b34140d240;p=thirdparty%2Fsnort3.git move enforcement of block from binder to flow_control (where it belongs) --- diff --git a/src/flow/flow_control.cc b/src/flow/flow_control.cc index 09d6a2bc4..6f6826ba5 100644 --- a/src/flow/flow_control.cc +++ b/src/flow/flow_control.cc @@ -374,11 +374,17 @@ unsigned FlowControl::process(Flow* flow, Packet* p) break; case Flow::ALLOW: + if ( news ) + stream.stop_inspection(flow, p, SSN_DIR_BOTH, -1, 0); + else + DisableInspection(p); p->ptrs.decode_flags |= DECODE_PKT_TRUST; - stream.stop_inspection(flow, p, SSN_DIR_BOTH, -1, 0); break; case Flow::BLOCK: + if ( news ) + stream.drop_traffic(flow, SSN_DIR_BOTH); + DisableInspection(p); Active_DropPacket(); break; } diff --git a/src/network_inspectors/binder/binder.cc b/src/network_inspectors/binder/binder.cc index 61f7e38bd..a30517afd 100644 --- a/src/network_inspectors/binder/binder.cc +++ b/src/network_inspectors/binder/binder.cc @@ -283,7 +283,6 @@ bool Stuff::apply_action(Flow* flow) switch ( action ) { case BA_BLOCK: - stream.drop_traffic(flow, SSN_DIR_BOTH); flow->set_state(Flow::BLOCK); return false;