mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 00:40:10 +00:00
Set max score on hosts contacting blacklisted hosts
This commit is contained in:
parent
95bd9ace07
commit
58b3d42d22
3 changed files with 8 additions and 4 deletions
|
|
@ -58,6 +58,8 @@ local stats = {
|
|||
partial_scripts = {}, -- List of scripts invoked on flow with THW not-completed
|
||||
}
|
||||
|
||||
local max_score = flow_consts.max_score
|
||||
|
||||
-- #################################################################
|
||||
|
||||
local function trace_f(trace_msg)
|
||||
|
|
@ -447,9 +449,9 @@ function flow.setStatus(flow_status_type, flow_score, cli_score, srv_score)
|
|||
end
|
||||
end
|
||||
|
||||
flow_score = math.min(math.max(flow_score or 0, 0), 1000)
|
||||
cli_score = math.min(math.max(cli_score or 0, 0), 1000)
|
||||
srv_score = math.min(math.max(srv_score or 0, 0), 1000)
|
||||
flow_score = math.min(math.max(flow_score or 0, 0), max_score)
|
||||
cli_score = math.min(math.max(cli_score or 0, 0), max_score)
|
||||
srv_score = math.min(math.max(srv_score or 0, 0), max_score)
|
||||
|
||||
c_flow_set_status(status_id, flow_score, cli_score, srv_score, cur_user_script.key)
|
||||
return(true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue