Treating octets as string

Eddie Stassen estassen at gmail.com
Thu Jan 27 14:18:03 CET 2011


Just add the line:

ATTRIBUTE       Class                   25      string

to the end of raddb/dictionary.  It will override the type defined in
the standard dictionaries, which you may not want to fiddle with too
much.


On Thu, Jan 27, 2011 at 2:45 PM, Brian Candler <B.Candler at pobox.com> wrote:
> In an accounting server, I would like to be able to parse the Class
> attribute with a regexp to pull parts out.  However the standard dictionary
> defines it as 'octets' which makes it hard to parse - and I'd like to avoid
> modifying the dictionary if possible.
>
> Copying it to a 'string' attribute doesn't help, because it gets
> hex-expanded at that point. e.g.
>
>        Reply-Message := "%{Class}"
>        }
>
> gives
>
>        Class = 0x466f6f7c426172
>        Reply-Message = "0x466f6f7c426172"
>
> I notice that recently a %{integer:...} expansion was added. Is there
> perhaps a case for a corresponding %{string:...} expansion? Or is there a
> better way to do this?
>
> Thanks,
>
> Brian.
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>




More information about the Freeradius-Users mailing list