How to match Vendor specific attribute
Alan DeKok
aland at deployingradius.com
Mon Oct 23 23:55:47 UTC 2023
On Oct 23, 2023, at 4:53 PM, Vishnu <vishnu.netcon at gmail.com> wrote:
> I am using freeradius as a proxy, I want to match the VSA with the if
> statement and add another VSA based on that. Below mentioned is my
> custom policy config.
>
> custom_policy {
> if (NAS-Identifier =~ /DUBDC1-EX2200-*/) {
> if (%{Switch-User-Policy} =~ /.*switch-superuser.*/)
You shouldn't need to use %{..}. Just refer to the attribute by name.
> if i use .* instead of /.*switch-superuser.*/ it works. but i want to match
> the string. Please let me know how i can achieve this.
If one there was some kind of debug output which could help.
> Below is the Access accept message.
Hmm.... that's not helpful at all.
Read this: http://wiki.freeradius.org/list-help
Ask *good* questions. "I did stuff and it didn't work" isn't a good question.
Alan DeKok.
More information about the Freeradius-Users
mailing list