<div dir="ltr"><pre>Hi Alan,
Thanks for reply.
Yes, I totally can understand the solution you recommend, and I've been
using this skill for quite a long time.
But the situation I encountered is :
1. I need to save some information returned in Access-Accept from
external AAA in the attribute *Class* at the section *post-auth*. So it will
return back to gateway.
2. Then gateway will send Accounting-Start to my server. In this time, I
need to pop out the information I saved in the attribute *Class* in the
section *accounting* so that I can generate the avp what I need.
Hence, it cannot work by using Tmp-XXX internal attribute because those two
events occur in two different sessions to FreeRADIUS.
I thought Tmp-* attributes will not exist across two sessions at the same
time.
So that way I must choose some kind of attribute that gateway must return
back for saving temporary attribute value.
Concerning about total available length of Class in our wifi gateway, I
don't want to do such a waste on attribute Class.
Again, just like I said before, because Class is a multi-value attribute I
can't find a way to remove a specific value from entire Class array.
But anyway, if this is too much for unlang I can use perl to fulfill this
definitely. Just curious about if unlang can totally achieve this. :P
If there are the class attributes then
Class = 0x3131<br> Class = 0x3232<br> Class = 0x3333
This will delete the second Class attribute with value 0x3232
if ("%{Class[1]}" =~ /^(0x3232)/i) {<br> update request {<br> Class -= "%{Class[1]}"<br> }<br>
}</pre></div>