Adding a binary null to a value using attr_rewrite

Alan DeKok aland at ox.org
Mon Jul 18 18:08:44 CEST 2005


Tore Anderson <tore at linpro.no> wrote:
> >   Huh?  You don't configure reply attributes in radiusd.conf
> 
>   Sure I do.  Relevant parts of my radiusd.conf:
> 
>   modules {
>     attr_rewrite add_class {

  Ah.  You're configuring a module.  Most modules read the attributes
from a database.

>   This works exactly as I want it to, but the stupid Siemens NAS seems
>  to require a null-byte at the end of the value - at least that's the
>  only difference I've found in the reply packet when I inspect dumps
>  from when it's communicating with the old RADIUS server (which works)
>  and the new FreeRADIUS-based one (which doesn't).

  Submit a bug on bugs.freeradius.org, sayign "Seimens NAS product X"
is broken.  Maybe public shame will push them to fix it.

>   Adding that null-byte to the replacewith string doesn't seem to work,
>  unfortunately.  At least not in any way I've tried - but the RFC
>  mandate that a server implementation should handle null-bytes, so I
>  would think there has to be /some/ way of doing it?

  Yes.  But it's a little complicated, because you're now trying to
treat "Class" as *both* a text string, and a sequence of binary bytes,
and the server isn't really set up to do that easily.

  Hmmm... I'll have to think about that.  I've *never* heard of this
problem before, so it's not immediately obvious how to solve it.

  Alan DeKok.




More information about the Freeradius-Users mailing list