On 07/22/2010 11:50 PM, Tom Leach wrote:
I'm currently using Freeradius v2.1.9 and I'm trying to write a
condition in the authorize section to use a different module depending
on whether Mac-auth or someother auth is being called.
In reading the wiki (http://wiki.freeradius.org/Mac-Auth) it appears
that I want to check (Chap-Password == hash(User-Name)) but I'm having a
problem getting the unlang syntax correct.

So far, I've tried:
        if (Chap-Password == hash(User-Name)){
which fails with:
        Consecutive conditions at (User-Name))
        /etc/raddb/sites-enabled/default[62]: Errors parsing authorize section.

AFAIK hash() or function calls in generall aren't a feature of unlang. Maybe the wiki page is listing pseudo-code?

You want something like:

if (User-Name =~ /..:..:..:..:..:../) {
}

...or whatever format the mac address is in I guess. If you can be more specific about what the two incoming requests you want to distinguish look like, I can be more specific in a suggestion ;o)
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to