Stripping prefix with unlang
Bernd
bernd at kroenchenstadt.de
Thu Mar 3 15:34:17 CET 2016
Hi,
I am pulling my hears for two hours now. I'd like to strip a prefix off
a request and I'm trying to use unlang in policy.d/filter to do that.
if (User-Name =~
/adsl\-bla\/([^%%]+)%%adsl-bla.kroenchenstadt.de/) {
update request {
User-Name := "([^%%]+)%%adsl-sbt.kroenchenstadt.de/"
}
}
doesn't work, as
if (User-Name =~ /adsl\-bla\/ {
update request {
User-Name -= "adsl\-bla\/"
}
}
also refuses to be that what I need.
I just need to strip ``adsl-bla/'' off the login request.
Help much appreciated — thanks!
Bernd
More information about the Freeradius-Users
mailing list