Hello,
Check this out if it helps. You want to renew data quota every hour to 5 MB, and whenever the data limit is reached you want to deny the access for that hour. Right?
So two cases are made out of this:
To deauth user whenever limit is reached**** - Check accounting packets on every packet run a query on radacct to check if limit is reached for this hour, if it has, send a disconnect. This will enter a "admin-reset" in accounting stop packet in radacct table.
The way queries.conf is written for accounting-update packets will not allow you to query for last hour, as there is only timestamp for beginning and end of session. So if user will consume 1MB in first hour, 2MB in second hour, and 3MB third hour (still one session as there is limit reached only in 3rd hour) your suggested way will not allow him to use 5MB in 3rd hour, only 2MB. I am not asking how to do this, but how to do this correctly, e.g. what is common best practice. Thanks, r.