unlang: copy a string attribute to an octets attribute without escaping ?

Phil Mayers p.mayers at imperial.ac.uk
Thu May 22 18:46:26 CEST 2014

On 22/05/14 17:19, Chaigneau, Nicolas wrote:

> Attr-String start with a 0x01 (escaped to \001).
> -> Attr-Octets gets "0x5c303031..." (instead of what I would like: "0x01...")
> Is there a way to force the assignement without the string being escaped ?

In 3.x yes:

  Attr-Octets = &control:Attr-String

...and maybe the <cast> stuff (haven't looked at it).

Not sure in older versions - there might be some kind of unlang xlat 
magic voodoo you can do, but I don't think so, it'll be the 
pairparsevalue() that is doing the interpretation.

More information about the Freeradius-Users mailing list