mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-20 17:29:13 +00:00
Fixes races when handling alert counters on view interfaces
Fixes #5424
This commit is contained in:
parent
66586dc75f
commit
0be596ee25
4 changed files with 52 additions and 11 deletions
|
|
@ -510,6 +510,11 @@ void ViewInterface::viewed_flows_walker(Flow *f, const struct timeval *tv) {
|
|||
srv_host->incScoreValue(srv_score_val, score_category, false /* as server */);
|
||||
}
|
||||
|
||||
if(partials.get_is_flow_alerted()) {
|
||||
if(cli_host) cli_host->incNumAlertedFlows(true /* As client */), cli_host->incTotalAlerts();
|
||||
if(srv_host) srv_host->incNumAlertedFlows(false /* As server */), srv_host->incTotalAlerts();
|
||||
}
|
||||
|
||||
incStats(true /* ingressPacket */,
|
||||
tv->tv_sec, cli_ip && cli_ip->isIPv4() ? ETHERTYPE_IP : ETHERTYPE_IPV6,
|
||||
f->getStatsProtocol(), f->get_protocol_category(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue