Adding custom SQL counter

Lorenzo Milesi maxxer at ufficyo.com
Sun Mar 1 21:41:07 CET 2015


>> Compared to a Max-Daily-Session attribute, in the radius debug I see the value
>> gets returned just after the group check query. Instead with my custom
>> attribute the value is never returned,
> 
>  What does that mean?

When there is no previous session on the current day with the Max-Daily-Session attribute I get the followin in debug:

rlm_counter: Current Time: 1425241760 [2015-03-01 21:29:20], Next reset 1425250800 [2015-03-02 00:00:00]
rlm_counter: reset_db: Closing database
rlm_counter: reset_db: Opened new database
rlm_counter: add_defaults: Start
rlm_counter: DEFAULT1 set to 1425250800
rlm_counter: DEFAULT2 set to 1425078000
rlm_counter: add_defaults: End
rlm_counter: reset_db ended
rlm_counter: Entering module authorize code
rlm_counter: Searching the database for key 'ALG02MAX'
rlm_counter: Could not find the requested key in the database.
rlm_counter: Check item = 200, Count = 0
rlm_counter: res is greater than zero
rlm_counter: (Check item - counter) is greater than zero
rlm_counter: Authorized user ALG02MAX, check_item=200, counter=0
rlm_counter: Sent Reply-Item for user ALG02MAX, Type=Session-Timeout, value=200
++[daily] = ok

which sets the default value to the one read from the radgroupcheck table. This is done BEFORE the counter queries are executed. When I add my custom attribute this Session-Timeout is not returned. this is what I'm missing.

-- 
Lorenzo Milesi - lorenzo.milesi at yetopen.it

YetOpen S.r.l. - http://www.yetopen.it/


More information about the Freeradius-Users mailing list