Re: Treating octets as string

2011-01-30 Thread Alan DeKok
Brian Candler wrote: OK, I've had a go at a patch. You can find it at https://github.com/candlerb/freeradius-server/tree/candlerb/string_expansion Aside: I guess you can't use this if you have an 'octets' value with an embedded null. If I set That's easy enough to fix, and the server

Re: Treating octets as string

2011-01-28 Thread Brian Candler
I notice that recently a %{integer:...} expansion was added. Is there perhaps a case for a corresponding %{string:...} expansion? Yes. Editing the dictionaries is not recommended, as it can have additional side effects. Adding %{string:Class} is pretty specific. OK, I've had a go

Treating octets as string

2011-01-27 Thread Brian Candler
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

Re: Treating octets as string

2011-01-27 Thread Eddie Stassen
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.cand...@pobox.com wrote:

Re: Treating octets as string

2011-01-27 Thread Alan DeKok
Brian Candler wrote: I notice that recently a %{integer:...} expansion was added. Is there perhaps a case for a corresponding %{string:...} expansion? Yes. Editing the dictionaries is not recommended, as it can have additional side effects. Adding %{string:Class} is pretty specific.