Freeradius V3 meta-attributes. Check item attributes

463 views Asked by At

I am trying to migrate from version 2 to version 3.

The same unlang code worked in version 2. However in version 3 the same code does not work.

This is the error:

/etc/freeradius/sites-enabled/default[406]: Failed parsing expanded string:

/etc/freeradius/sites-enabled/default[406]: %{sql:SET @reset_date = '%{check:Reset-Date}'; SELECT IFNULL((sum(acctinputoctets)+sum(acctoutp... 

/etc/freeradius/sites-enabled/default[406]:                            ^ Unknown module

If I remove check the parser does not throw errors.

Change '%{check:Reset-Date}' to '%{Reset-Date}'. However this will break my code, because Reset-Date is a radcheck attribute, stored in the radcheck table.

Any ideas?

2

There are 2 answers

1
Arran Cudbard-Bell On

It's control:Reset-Date. We've never had check as a list qualifier.

Check items are specific to the users file and sql modules.

0
philip On

This how you can use control to check on expiry with expiration as an attribute

#expiration
    expiration{
        userlock = 1
        }
        if(userlock){
            update reply {
            Reply-Message := "Your account expired on %{control:Expiration}. Please refill your account to continue enjoying our service."
            }
            reject
        }

Now help us understand what you are trying to do.