rlm_redis fixes

Brian Candler B.Candler at pobox.com
Thu Feb 7 18:28:57 CET 2013


I have been running a 2.2.0 server with a couple of rlm_redis patches for
several weeks now with no ill effects (processing some tens or hundreds of
accounting packets per second).

They are the top two commits in
https://github.com/candlerb/freeradius-server/tree/candlerb/redis_escaping

The earlier one,
https://github.com/candlerb/freeradius-server/commit/fe7ffbe1e016684a3b791fc86a00fdc7d2f7ccd9
changes the way that redis escaping is done to allow for values containing
spaces. It does this by tokenising the source string on spaces and then
calling xlat on each part individually, building an array of separately
expanded arguments to pass to redis. This is an approach which was suggested
to me on the list.

It is however a behaviour change. Given rlm_rediswho with
    start-insert = "LPUSH %{User-Name} %l"
and username "foo bar":

* originally rlm_rediswho would fail
* as of commit 6e8e5ab2 it would insert "foo=20bar"
* with this patch it will insert "foo bar"

The second one,
https://github.com/candlerb/freeradius-server/commit/bb7b54637812e787ade8bc27dc215ede2f8653e2
is a bug fix for rlm_rediswho: the TRIM functionality wasn't working,
because it was checking the value returned by redis after
redis_finish_query() was called, and hence was always reading zero.

Do you think these can be merged?

Thanks,

Brian.


More information about the Freeradius-Devel mailing list