acct_unique with more than one Class attribute

Brian Candler b.candler at pobox.com
Mon Mar 27 12:55:04 CEST 2017


On 27/03/2017 11:45, Andrea Gabellini wrote:
> Mon Mar 27 12:40:37 2017 : Debug: (2)       if (&Class[*] =~ /(.*)/)  {
> Mon Mar 27 12:40:37 2017 : Debug: (2)         update request {
> Mon Mar 27 12:40:37 2017 : Debug: (2)           EXPAND Match: %{1}
> Mon Mar 27 12:40:37 2017 : Debug: (2)              --> Match:
> 0x54657374436c617373
> Mon Mar 27 12:40:37 2017 : Debug: (2)           &Tmp-String-5 := Match:
> 0x54657374436c617373

Ah, so that seems to have worked; the problem is doing a regexp match on 
an "octets" attribute, which is converting it to hex first, and that's 
not what you want.

You could as a temporary workaround try putting an override in your 
local dictionary (raddb/dictionary):

ATTRIBUTE     Class                                   25      string

That should work because I ended up doing exactly that a long time ago 
with FreeRADIUS 2.1.

Otherwise in 3.0 it might be possible to try casting, e.g. 
<string>&Class, but I'm not sure if that will also give you the hex 
encoding.


More information about the Freeradius-Users mailing list