acct_unique with more than one Class attribute

Brian Candler b.candler at pobox.com
Mon Mar 27 12:43:48 CEST 2017


On 27/03/2017 11:10, Brian Candler wrote:
> The underlying issue is that 'Class' is not a string attribute, so 
> it's hard to treat it as such.

Ah now I see, that's probably why &Class =~ /.../ may not work.

You could try (<string>&Class[*] =~ /.../).

Or you could try copying &Class to &Tmp-String-0 first. I believe there 
is a syntax for copying all the values of one attribute to another 
attribute, but I can't remember what that is right now.

Also there is the filtering version of update you can try:

update request {

     &Class =~ /.../

}

which only keeps instances matching the regexp. Again, not sure how the 
binary Class attribute will interact with that.

Sorry, I'm not being very specific here, you'll have to test the various 
options.

Regards,

Brian.


More information about the Freeradius-Users mailing list