Hi List, 

It seems that that admin guide section on Radius accounting is wrong about the 
time interval we can use. 


The document states: 
<quote on> 

Violations 
Using PacketFence, it is possible to add violations to limit bandwidth abuse. 
The format of the trigger 
is very simple: 
Accounting::[DIRECTION][LIMIT][INTERVAL(optional)] 
Let’s explain each chunk properly: 
∏ DIRECTION: You can either set a limit to inbound(IN), outbound(OUT), or 
total(TOT) bandwidth 
∏ LIMIT: You can set a number of bytes(B), kilobytes(KB), megabytes(MB), 
gigabytes(GB), or 
petabytes(PB) 
∏ INTERVAL: This is actually the time window we will look for potential abuse. 
You can set a number 
of seconds(s),minutes(m),hours(h),days(D),weeks(W),months(M), or years(Y). This 
value is optional, 
if you set nothing, we will check in all the data we have since your 
packetfence install. 
</quote off> 


But when you look at the code in /usr/local/pf/lib/pf/config.pm we have: 

Accepted time modifier values 
# if you change these, make sure to change: 
# html/admin/common/helpers.inc's get_time_units_for_dropdown and 
get_time_regexp() 


our $TIME_MODIFIER_RE = qr/[smhDWMY]/; 
our $ACCT_TIME_MODIFIER_RE = qr/[DWMY]/; 
our $DEADLINE_UNIT = qr/[RF]/; 


and the $ACCT_TIME_MODIFIER_RE is the one use to parse accounting triggers in 
/usr/local/pf/lib/pf/accounting.pm: 

# This parses the specific accounting violation trigger format 
Readonly our $ACCOUNTING_TRIGGER_RE => qr/ 
($BANDWIDTH_DIRECTION_RE) # bandwidth direction 
(\d+) # nb of bandwidth units 
($BANDWIDTH_UNITS_RE) # bandwidth units 
($ACCT_TIME_MODIFIER_RE) # accounting time window (time modifier) 
/x; 




It seems that the admin guide should be updated to specify that, without 
modifying the config.pm, only DWMY are available in accounting violation 
triggers. 


Regards, 



------------------------------------------------------------------------------
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to