]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
managers: only publish the reloaded flow event for existing flows with an old policy
authorRon Dempster (rdempste) <rdempste@cisco.com>
Fri, 5 Aug 2022 14:38:01 +0000 (10:38 -0400)
committerRon Dempster (rdempste) <rdempste@cisco.com>
Thu, 11 Aug 2022 15:07:12 +0000 (15:07 +0000)
src/managers/inspector_manager.cc
src/network_inspectors/binder/binder.cc

index cc926718e3f525ca3f429e8627bea45f882724d8..7562041b4713a28b8f093a61ec2a88779e67c772 100644 (file)
@@ -2096,7 +2096,7 @@ void InspectorManager::internal_execute(Packet* p)
     unsigned reload_id = SnortConfig::get_thread_reload_id();
     if ( p->flow )
     {
-        if ( p->flow->reload_id != reload_id )
+        if ( p->flow->reload_id && p->flow->reload_id != reload_id )
             DataBus::publish(FLOW_STATE_RELOADED_EVENT, p, p->flow);
     }
     else
index 65359c6e758a5f243e2a224bb211500cf6a3ea78..f9e9090101b148024de8a477abbad23d28e302f6 100644 (file)
@@ -578,8 +578,7 @@ public:
 
     void handle(DataEvent&, Flow* flow) override
     {
-        // If reload_id is zero, this is a new flow and is bound by FLOW_STATE_SETUP_EVENT
-        if (flow && flow->reload_id && Flow::FlowState::INSPECT == flow->flow_state)
+        if (flow && Flow::FlowState::INSPECT == flow->flow_state)
         {
             Binder* binder = InspectorManager::get_binder();
             if (binder)