Dennis Skinner <[EMAIL PROTECTED]> wrote: > I'm trying to set the value of a custom attribute based on the value of > one passed in the packet from the client/nas (specifically > Client-IP-Address). Something akin to this if it were allowed: > > DEFAULT Client-IP-Address =~ "10.1.1." > Custom-Attr := "network1"
It's allowed. The reason it doesn't work for you is that "10.1.1." isn't a useful regular expression. Try "^10\.1\.1\.", and it should work. > If necessary, I could just use the client-ip attr directly in the > radcheck db, but if the IP addresses change for the clients, or new ones > are added, I would have to change everyone's entry in radcheck. Why not use rlm_passwd? Have a "passwd" style file, looking up the client IP, and returning your Custom-Attr. That way, there's only one file to manage. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html