On Apr 26, 2023, at 11:03 AM, Alex Zetaeffesse <fzetafs@gmail.com> wrote:
Is there a more compact way to state what follows?
switch { ("%{User-Name}" =~ /@tenant101\.bic\.local/) {update control{Proxy-To-Realm := "tenant101"}
That's not correct configuration syntax, but OK... In general things like this are best done with regular expressions. Especially if the data you're trying to use is part of the input packet. if (&User-Name =~ /([^.]+)\.bic\.local) { update control { &Proxy-To-Realm := "%{1}" } } You also don't have to put quotes around references to User-Name. Just use &User-Name. This works, and that's what the documentation says to do. I have no idea why so many people use constructs like "%{User-Name}". It's just not necessary. Alan DeKok.