I have a internal check Attribute My-Test defined as string. I have the following in authorize

         update reply {
                               Reply-Message = " Hi "
        }
       switch control:My-Test {
               case "500" {
                       update control {
                               Auth-Type := Reject
                       }
                       update reply {
                               Reply-Message = " Rejected "
                       }
               }
               case {
                       update control {
                               Auth-Type := PAM
                       }
                       update reply {
                               Reply-Message = " Accepted "
                       }
               }


Firstly I noticed that I can not update an attribute twice as I always get the reply message Hi. Secondly the switch case does not work but an if does

       if (control:My-Test == "500" ) {
                       update control {
                               Auth-Type := Reject
                       }
                       update reply {
                               Reply-Message = " Rejected "
                       }
       }
       else {
                       update control {
                               Auth-Type := PAM
                       }
                       update reply {
                               Reply-Message = " Accepted "
                       }
       }

Is this a bug or wrong programming ?

Thank you
Markus

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to