I'm trying to change user speed to lower when he reach transfer limit.
Currently after reaching transfer limit NAS is disconnecting user and when
he's trying to connect he is rejected. In debug log I can see:

rlm_sqlcounter: (Check item - counter) is less than zero
rlm_sqlcounter: Rejected user user01, check_item=50000000, counter=50062959
++[noresetbytescounter] returns reject

Could you help me with Post-Auth-Type REJECT? How can I read the
control:counters in Post-Auth? I couldn't find an answer on forum... What
should I write instead "if (%{control:counter} > %{control:check_item} ) {"
in my config?

Post-Auth-Type REJECT {
            if (%{control:counter} > %{control:check_item} ) {
                update reply {
                      Reply-Message := "You have reached your transfer limit. 
Limited
bandwitch"
                }
                update control {
                                Auth-Type := "Accept"
                                WISPr-Bandwidth-Max-Down = 1048576
                                WISPr-Bandwidth-Max-Up = 262144
                        }
}

My sqlcounter.conf:
sqlcounter noresetbytescounter {
            counter-name = Max-Total-Octets
            check-name = Max-Total-Octets
            reply-name = HotSpot-Max-Total-Octets
            sqlmod-inst = sql 
            key = User-Name 
            reset = never 
            query = "SELECT SUM(AcctInputOctets)+SUM(AcctOutputOctets) FROM
radacct WHERE UserName='%{%k}'" 
} 

Greetings
Pawel
-- 
View this message in context: 
http://old.nabble.com/customize-Post-Auth-Type-REJECT-tp27173361p27173361.html
Sent from the FreeRadius - User mailing list archive at Nabble.com.

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to