Wow, that's made my day, works perfectly! I didn't realise you could use Tmp-* as a request "type" variable - does it belong in request or control, I've always assumed the latter but it makes things more concise due to the assumed request type. Anyway, really appreciate the time you took to try stuff out there Alan, thanks again. Andy -----Original Message----- From: Freeradius-Users [mailto:freeradius-users-bounces+andy.franks=sath.nhs.uk@lists.freeradius.org] On Behalf Of Alan DeKok Sent: 15 December 2015 16:00 To: FreeRadius users mailing list Subject: Re: Index is not an integer On Dec 15, 2015, at 9:20 AM, Franks Andy (IT Technical Architecture Manager) <Andy.Franks@sath.nhs.uk> wrote:
Had an earlier attempt was to break it down, guess I might have come at it from the wrong angle, i.e. trying "%{xlat:%{control:Tmp-Integer-0}}". I imagined that piece to be expanded first into and integer, in the way bracketed things work inside -> out.
"%{Control:Tmp-Integer-0}" is fine, gives the correct number, no great surprise there.
I can't test "%{control:Tmp-String-3[%{control:Tmp-Integer-0}]}" as the server won't start up since it doesn't see control:Tmp-Integer-0 as an actual integer.
Yes. I did this: update request { Tmp-Integer-0 := 1 Tmp-String-0 += "a" Tmp-String-0 += "b" Tmp-String-0 += "c" } update reply { Filter-Id := "%{xlat:Tmp-String-0[%{Tmp-Integer-0}]}" } and it worked. The Filter-Id had 'b' as a value. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Tue, Dec 15, 2015 at 04:32:55PM +0000, Franks Andy (IT Technical Architecture Manager) wrote:
I didn't realise you could use Tmp-* as a request "type" variable - does it belong in request or control, I've always assumed the latter but it makes things more concise due to the assumed request type.
They are just attributes. They can go in any list. Matthew -- Matthew Newton, Ph.D. <mcn4@le.ac.uk> Systems Specialist, Infrastructure Services, I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom For IT help contact helpdesk extn. 2253, <ithelp@le.ac.uk>
participants (2)
-
Franks Andy (IT Technical Architecture Manager) -
Matthew Newton