stack allowances

Jed Gainer jedgainer at gmail.com
Fri Feb 22 21:24:50 CET 2013


freeradius 2.2.0-3

    sqlcounter counterChilliSpotMaxTotalOctetsDaily {
            counter-name = ChilliSpot-Max-Total-Octets-Daily
            check-name = CS-Total-Octets-Daily
            counter-type = data
            reply-name = ChilliSpot-Max-Total-Octets
            sqlmod-inst = sql
            key = User-Name
            reset = daily
            query = "SELECT IFNULL((SUM(AcctInputOctets +
AcctOutputOctets)),0) FROM radacct WHERE UserName='%{%k}' AND
UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"
    }

    sqlcounter counterChilliSpotMaxTotalOctetsAll {
            counter-name = ChilliSpot-Max-Total-Octets
            check-name = CS-Total-Octets
            counter-type = data
            reply-name = ChilliSpot-Max-Total-Octets
            sqlmod-inst = sql
            key = User-Name
            reset = never
            query = "SELECT IFNULL((SUM(AcctInputOctets +
AcctOutputOctets)),0) FROM radacct WHERE UserName='%{%k}' AND
UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"
    }

I use CS-Total-Octets-Daily to give staff a daily limit and CS-Total-Octets
to give guests a "jump start".

Guests can buy more bandwidth via PayPal and it is appended to their
CS-Total-Octets which works great.

Problem is when a staff member buys more they all of a sudden have
CS-Total-Octets and CS-Total-Octets-Daily in their radcheck which locks
them out because their bandwidth usage is over CS-Total-Octets.

Does anyone see a solution to my problem other than staff using 2 accounts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20130222/785e59d0/attachment.html>


More information about the Freeradius-Users mailing list