How to match Vendor specific attribute
Vishnu
vishnu.netcon at gmail.com
Mon Oct 23 20:53:41 UTC 2023
Hi,
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.*/)
update reply {
Juniper-Local-User-Name = "switch-superuser"
}
}
}
}
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.
Below is the Access accept message.
(0) Sent Access-Accept Id 203 from 10.108.25.102:1812 to 10.108.25.29:56849
length 44
(0) Switch-User-Policy = "switch-superuser"
Thanks,
Vishnu
More information about the Freeradius-Users
mailing list