Accessing REQUEST structure data outside FreeRADIUS module

Alan DeKok aland at nitros9.org
Wed Apr 12 20:22:53 CEST 2006


"Nicolas Castel" <nicolas.castel at gmail.com> wrote:
> I'm using FreeRADIUS v1.1.0. I'm developping  some modules and I try to
> access auth_req structure (REQUEST) data from an  external function (out of
> my module) and it fails. All works fine when  accessing this data from the
> module itself but when i call an external  function with the address of
> REQUEST, it doesn't work.

  It's possible.  Lots and lots of modules do it.

  The problem is most likely that you're passing different
compile-time flags to the different C files.  As a result, the "magic"
entry at the top of the REQUEST structure is used in one C file, but
not in another.  There is no such magic in the RADIUS_PACKET
structure, so that always works.

  The solution is to build your module either as you're building the
server, or pass -DNDEBUG as an option to the compiler.

  Alan DeKok.



More information about the Freeradius-Users mailing list