On 2010/07/21 11:00 AM, Alan DeKok wrote:

authorize {
        ...
        if (ADSL-Agent-Circuit-Id&&  \
                ("%{sql: select ...}")) {
                update control {
                        Auth-Type := Accept
                }

        }
        else {
                reject
        }

}


I disagree with the logic slightly.
In my opinion it will also be rejected if ADSL-Agent-Circuit-Id does not exist.

As fas as I understand, the desireable result is:
If the ADSL-Agent-Circuit-Id does *not* exist, normal authentication must happen.
If it *does* exist, accept or reject, depending on its value.

Would this not work better?

authorize {
        ...
        if (ADSL-Agent-Circuit-Id) {
                if ("%{sql: select ...}") {
                        update control {
                                Auth-Type := Accept
                        }
                }
                else {
                        reject
                }
        }
}




--


Johan Meiring
Cape PC Services CC
Tel: (021) 883-8271
Fax: (021) 886-7782

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

Reply via email to