Index is not an integer

Franks Andy (IT Technical Architecture Manager) Andy.Franks at sath.nhs.uk
Tue Dec 15 17:32:55 CET 2015


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 at 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 at 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



More information about the Freeradius-Users mailing list