Calling a module name from a dynamic variable
Franks Andy (IT Technical Architecture Manager)
Andy.Franks at sath.nhs.uk
Thu Nov 5 16:28:15 CET 2015
Ok, good plan. I'll do that. :-)
-----Original Message-----
From: Freeradius-Users [mailto:freeradius-users-bounces+andy.franks=sath.nhs.uk at lists.freeradius.org] On Behalf Of Arran Cudbard-Bell
Sent: 05 November 2015 15:23
To: FreeRadius users mailing list
Subject: Re: Calling a module name from a dynamic variable
> On Nov 5, 2015, at 10:15 AM, Franks Andy (IT Technical Architecture Manager) <Andy.Franks at sath.nhs.uk> wrote:
>
> Ok, that settles it, thought as much - I've done some code for switch/case now.
> Just one last question - if we previously had something like:
>
> Auth-type inner-eap {
> Inner-eap {
> reject = 1
> ok = 1
> invalid = 1
> }
> If (!ok) {
> ..
> }
> }
>
> The question is if I did a switch statement :
>
> Auth-type inner-eap {
> Switch (somevar) {
> Case somevalue {
> Custom-inner-eap {
> Reject =1
> Ok = 1
> Invalid = 1
> }
> Case someothervalue {
> Custom-other-inner-eap {
> Reject =1
> Ok = 1
> Invalid = 1
> }
> }
> }
> If (!ok) {
> ..
> }
> }
>
> Does the !ok bit still belong to whatever module is called in the switch statement? I guess so, but wanted to make sure the ok doesn't belong to the switch/case block.
In that instance you should just set control:Auth-Type and use different Auth-Type sections.
-Arran
More information about the Freeradius-Users
mailing list