Return or not return

Franks Andy (IT Technical Architecture Manager) Andy.Franks at sath.nhs.uk
Thu Jul 7 14:53:35 CEST 2016


Thanks Alan, that's great.
Andy

-----Original Message-----
From: Freeradius-Users [mailto:freeradius-users-bounces+andy.franks=sath.nhs.uk at lists.freeradius.org] On Behalf Of Alan DeKok
Sent: 07 July 2016 13:22
To: FreeRadius users mailing list
Subject: Re: Return or not return

On Jul 7, 2016, at 7:46 AM, Franks Andy (IT Technical Architecture Manager) <Andy.Franks at sath.nhs.uk> wrote:
> 
> Hi all,
>  Another basic question. I feel like a dunce coming here. Oh well, here goes :
>  I'm confused about the correct way to exit processing of a policy/unlang bit of "code". I guess I'm used to treating them like subroutines, but that may be naughty behaviour since I'm not sure return is exactly what I want, in fact I'm fairly sure it isn't, as a way of halting processing of a policy based on condition checks.

  Policies aren't subroutines.  They're essentially copied in place.

  Note that they're not *documented* as subroutines.  We hope to fix that for 4.0.

> Anyway, is there a better way of stopping a set of checks etc for a policy or module without using if .. else throughout the policy, and continuing the rest of the authorisation or accounting section?

  Nope.  Just use if/else.  It's imperfect, but it works.

  Alan DeKok.


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



More information about the Freeradius-Users mailing list