23 Oct
2023
23 Oct
'23
4:53 p.m.
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