]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
move enforcement of block from binder to flow_control (where it belongs)
authorRuss Combs <rucombs@cisco.com>
Mon, 1 Dec 2014 20:29:25 +0000 (15:29 -0500)
committerRuss Combs <rucombs@cisco.com>
Mon, 1 Dec 2014 20:29:25 +0000 (15:29 -0500)
src/flow/flow_control.cc
src/network_inspectors/binder/binder.cc

index 09d6a2bc456a4aad5d0fcf8df944f8d28cfdc48f..6f6826ba52a455dfd0ce2a487cdcc61f250fbf49 100644 (file)
@@ -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;
     }
index 61f7e38bd2a738970c976ebc3a54dd34a98fa2e3..a30517afd5e951f7ca5b0b0eb291ec935039a7b1 100644 (file)
@@ -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;