Sorry, i read mans and comments in config and try to do like you say but it's not work as i need. I have sqlcounter: sqlcounter noresetBytecounter { counter-name = Total-Max-Octets check-name = Max-Octets reply-name = ChilliSpot-Max-Total-Octets sqlmod-inst = sql key = User-Name reset = never query = "SELECT (SUM(AcctInputOctets)+SUM(AcctOutputOctets)) FROM radacct WHERE UserName='%{%k}'" }
post-auth section in sites-enabled/default: Post-Auth-Type REJECT { attr_filter.access_reject
if (control:Max-Octets > 0) { update reply { Reply-Message := "Traffic limit exceeded." } }
}
Looking at that it should probably be: control:Max-Octets (check value) < control:Total-Max-Octets (counter value). I don't think that negative value vill go into (reply:) ChilliSpot-Max-Total-Octets. If it doesn't work, you can check if reply value is zero. Ivan Kalik Kalik Informatika ISP