Treating octets as string

Brian Candler B.Candler at pobox.com
Thu Jan 27 13:45:00 CET 2011


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.



More information about the Freeradius-Users mailing list