rlm_redis module "patch"

Alan DeKok aland at deployingradius.com
Thu Jan 13 21:00:51 CET 2011

Gabriel Blanchard wrote:
> There's something I don't understand though, once you've registered your xlat function using
> xlat_register(inst->xlat_name, <function name here>, inst);
> Where/how do you call it?

  Instead of a configuration like:

	foo_query = "hello %T"

  you use:

	foo_query = "hello %{rediswho:trim_count}"

  The first is specific to the rediswho module, and can't be used
*anywhere* else.

  The second is a little more awkward to read, but more generic.

  Or, you could do what the SQL module does:

	foo_query = "hello ${trim_count}"

  in which case "trim_count" is taken from the configuration when the
module loads.  The server core parses the string, and when the module
"init" routine is called, it sees:

	foo_query = "hello 5"

  Much better...

  Alan DeKok.

More information about the Freeradius-Devel mailing list