mirror of
https://github.com/ntop/ntopng.git
synced 2026-06-02 07:03:13 +00:00
Flow::getFlowStatus is now setting a bitmap to handle multiple statuses to be exposed in the flowinfo
This commit is contained in:
parent
d630cce58a
commit
4ea64d4275
5 changed files with 181 additions and 147 deletions
|
|
@ -3751,6 +3751,8 @@ static bool flow_matches(Flow *f, struct flowHostRetriever *retriever) {
|
|||
#ifdef HAVE_NEDGE
|
||||
bool filtered_flows;
|
||||
#endif
|
||||
FlowStatus status;
|
||||
FlowStatusMap status_map;
|
||||
|
||||
if(f && (!f->idle())) {
|
||||
if(retriever->host) {
|
||||
|
|
@ -3915,16 +3917,18 @@ static bool flow_matches(Flow *f, struct flowHostRetriever *retriever) {
|
|||
|| ((server_policy == location_remote_only) && (f->get_srv_host()->isLocalHost()))))
|
||||
return(false);
|
||||
|
||||
status = f->getFlowStatus(&status_map);
|
||||
|
||||
if(retriever->pag
|
||||
&& retriever->pag->alertedFlows(&alerted_flows)
|
||||
&& ((alerted_flows && f->getFlowStatus() == status_normal)
|
||||
|| (!alerted_flows && f->getFlowStatus() != status_normal)))
|
||||
&& ((alerted_flows && status == status_normal)
|
||||
|| (!alerted_flows && status != status_normal)))
|
||||
return(false);
|
||||
|
||||
/* Flow Status filter */
|
||||
if(retriever->pag
|
||||
&& retriever->pag->flowStatusFilter(&flow_status_filter)
|
||||
&& f->getFlowStatus() != flow_status_filter)
|
||||
&& status != flow_status_filter)
|
||||
return(false);
|
||||
|
||||
#ifdef HAVE_NEDGE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue