matching operator name case sensitive
Hi I am totally new to freeradius and with the help of the excellent wiki ( https://wiki.freeradius.org/guide/eduroam) have a working test server with only one apparent simple niggling issue, operator name matching is case sensitive when using the expression below to match multiple domains. I understand that cannot use "/i" in the this instance but am really struggling to find another way making this case insensitive. I should really appreciate it if someone could give me a hint, point me in another direction or even better give an example. many thanks Pete if (&Stripped-User-Domain != "${operator_name1}") && (&Stripped-User-Domain != ${operator_name2}")&& (&Stripped-User-Domain != "${operator_name3}") && (&Stripped-User-Domain != "${operator_name4}") { update { control:Load-Balance-Key := &Calling-Station-ID control:Proxy-To-Realm := 'eduroam' # Operator name (RFC 5580) identifies the network the # request originated from. It's not absolutely necessary # but it helps with debugging. request:Operator-Name := "1${operator_name1}" } return } -- <https://twitter.com/warwickshirecol> <https://www.facebook.com/WarwickshireCollege> <https://www.linkedin.com/edu/warwickshire-college-group-355076> <https://www.instagram.com/warwickshirecol/> College Email Disclaimer This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited and may be unlawful. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, otherwise than to notify the College via postmaster@warkscol.ac.uk <mailto:postmaster@warkscol.ac.uk>. You should delete this message and any files transmitted with it from your computer and destroy any copies made. Warwickshire College gives no warranty or representation as to the accuracy or reliability of the message and files and does not necessarily endorse any opinions expressed within it.
On Jun 7, 2018, at 10:26 AM, Peter Steadman <psteadman@warwickshire.ac.uk> wrote:
Hi I am totally new to freeradius and with the help of the excellent wiki ( https://wiki.freeradius.org/guide/eduroam) have a working test server
That's good to hear,
with only one apparent simple niggling issue, operator name matching is case sensitive when using the expression below to match multiple domains. I understand that cannot use "/i" in the this instance
Why not? Just use a regular expression match. See "man unlang"
but am really struggling to find another way making this case insensitive. I should really appreciate it if someone could give me a hint, point me in another direction or even better give an example. many thanks Pete
if (&Stripped-User-Domain !~ /^${operator_name1}$/i) ... Alan DeKok.
participants (2)
-
Alan DeKok -
Peter Steadman