Why does 'switch' and case don't work?

luckydog xf luckydogxf at gmail.com
Tue Nov 21 10:54:13 CET 2017


Hi,

   switch statement in post-auth section doesn't work, see below.

=============
switch &LDAP-Group {

        case "network-admins" {

        update reply {
                Service-Type = "NAS-Prompt-User",
                Huawei-Exec-Privilege = "3",
                Login-Service = 50,
                }
        }


        case "network-0" {

           update reply {
                Service-Type = "NAS-Prompt-User",
                Huawei-Exec-Privilege = "0",
                Login-Service = 50,
                }
        }

        case {

             reject

             }

}

=========================

It always comes down to the 'default' reject part, it looks like
<LDAP-Group > match nothing.


where if/elsif/else works as expected. What's wrong with my statement above?


More information about the Freeradius-Users mailing list