Calling a module name from a dynamic variable

Arran Cudbard-Bell a.cudbardb at freeradius.org
Thu Nov 5 16:22:47 CET 2015


> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20151105/2aa65486/attachment.sig>


More information about the Freeradius-Users mailing list