Fwd: stack allowances

Jed Gainer jedgainer at gmail.com
Wed Feb 27 00:15:19 CET 2013


Did anyone get this?

---------- Forwarded message ----------
From: Jed Gainer <jedgainer at gmail.com>
Date: Fri, Feb 22, 2013 at 12:24 PM
Subject: stack allowances
To: FreeRadius users mailing list <freeradius-users at lists.freeradius.org>


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/20130226/70fa32a6/attachment.html>


More information about the Freeradius-Users mailing list