mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Added some log for radius accounting
This commit is contained in:
parent
f1e72ffddd
commit
205a4b0fbf
3 changed files with 7 additions and 5 deletions
|
|
@ -53,6 +53,8 @@ function radius_handler.accountingStart(name, username, password)
|
|||
return true
|
||||
end
|
||||
|
||||
traceError(TRACE_NORMAL, TRACE_CONSOLE, string.format("Accounting start requested for MAC [%s] with username [%s]", name, username))
|
||||
|
||||
local session_id = tostring(math.random(100000000000000000, 999999999999999999))
|
||||
local ip_address = get_first_ip(name)
|
||||
local current_time = os.time()
|
||||
|
|
@ -87,10 +89,12 @@ function radius_handler.accountingStop(name, terminate_cause, info)
|
|||
return true
|
||||
end
|
||||
|
||||
local is_accounting_on, user_data = radius_handler.isAccountingRequested(name)
|
||||
local _, user_data = radius_handler.isAccountingRequested(name)
|
||||
-- Removing the entry from redis
|
||||
ntop.delCache(string.format(redis_accounting_key, name))
|
||||
|
||||
traceError(TRACE_NORMAL, TRACE_CONSOLE, string.format("Accounting stop requested for MAC [%s]", name))
|
||||
|
||||
-- Check in case no user_data is found
|
||||
if user_data then
|
||||
local bytes_sent = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue