Framed-IP-Address, debit pool conflict

Ali Arslan e066377 at
Fri Jul 12 10:25:19 CEST 2019

In our system we put users that have unpaid invoices in debit group which has Framed-Pool = debit_pool so they can't access internet.
But this does not work for users that have static IP because in that case user does not get ip from debit pool. Not to delete radreply record for Framed-IP-Address and to give the same ip back after payment my solution is to add a column named IsActive (tinyint -bool)  to radreply table and change authorize_reply_query in  /etc/freeradius/3.0/mods-config/sql/main/mysql/queries.conf follows:
authorize_reply_query = "\
        SELECT id, username, attribute, value, op \
        FROM ${authreply_table} \
        WHERE username = '%{SQL-User-Name}' AND IsActive = 1 \
        ORDER BY id"
and when putting user in debit group IsActive field is set as 0 and after payment it is set as 1.
Is it an acceptable solution without side effects, or are there better solutions?

More information about the Freeradius-Users mailing list