return verdict;
}
+static void packet_trace_dump(Packet* p, DAQ_Verdict verdict, bool msg_was_held)
+{
+ if (PacketTracer::is_active())
+ {
+ PacketTracer::log("Policies: Network %u, Inspection %u, Detection %u\n",
+ get_network_policy()->user_policy_id, get_inspection_policy()->user_policy_id,
+ get_ips_policy()->user_policy_id);
+
+ if (p->active->packet_retry_requested())
+ PacketTracer::log("Verdict: Queuing for Retry\n");
+ else if (msg_was_held)
+ PacketTracer::log("Verdict: Holding for Detection\n");
+ else
+ PacketTracer::log("Verdict: %s\n", SFDAQ::verdict_to_string(verdict));
+ PacketTracer::dump(p);
+ }
+
+ if (PacketTracer::is_daq_activated())
+ PacketTracer::daq_dump(p);
+}
+
void Analyzer::add_to_retry_queue(DAQ_Msg_h daq_msg)
{
retry_queue->put(daq_msg);
verdict = distill_verdict(p);
}
- if (PacketTracer::is_active())
- {
- PacketTracer::log("Policies: Network %u, Inspection %u, Detection %u\n",
- get_network_policy()->user_policy_id, get_inspection_policy()->user_policy_id,
- get_ips_policy()->user_policy_id);
-
- if (p->active->packet_retry_requested())
- PacketTracer::log("Verdict: Queuing for Retry\n");
- else if (msg_was_held)
- PacketTracer::log("Verdict: Holding for Detection\n");
- else
- PacketTracer::log("Verdict: %s\n", SFDAQ::verdict_to_string(verdict));
- PacketTracer::dump(p);
- }
-
- if (PacketTracer::is_daq_activated())
- PacketTracer::daq_dump(p);
-
HighAvailabilityManager::process_update(p->flow, p);
if (verdict != MAX_DAQ_VERDICT)
DataBus::publish(FINALIZE_PACKET_EVENT, event);
}
+ packet_trace_dump(p, verdict, msg_was_held);
+
if (verdict == DAQ_VERDICT_BLOCK or verdict == DAQ_VERDICT_BLACKLIST)
p->active->send_reason_to_daq(*p);
p->daq_instance->finalize_message(p->daq_msg, verdict);
}
}
+ else
+ {
+ packet_trace_dump(p, verdict, msg_was_held);
+ }
}
void Analyzer::process_daq_pkt_msg(DAQ_Msg_h msg, bool retry)