unlang vs suffix

Rui Ribeiro ruyrybeyro at gmail.com
Wed Nov 13 17:34:21 CET 2013


Hi,

I have a simple doubt; I have seen many times a couple of people saying
they prefer to use unlang than the suffix directive; what´s the advantage
of - supposing proxy.conf is adequately  configured, instead of doing


suffix

do instead (ignore the if part, I know it is missing in the example above,
it is here just for the sake of clarity):


        if (!(User-Name =~ /^([^@]*)@(.+)$/)) {
           update reply {
              Reply-Message := "malformed username"
           }
           reject
        }
        else {
           update request {
                Stripped-User-Name := "%{1}"
                Realm := "%{2}"
           }
           if (Realm == "iscte.pt") {
              update control {
                 Proxy-To-Realm := LOCAL
              }
           }
           else {
              update control {
                 Proxy-To-Realm := EDUROAM
              }
           }
        }

Regards,
Rui

Regards,
Rui Ribeiro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20131113/c796b353/attachment.html>


More information about the Freeradius-Users mailing list