FreeRADIUS/freeradius-server — pull request #190 by candlerb (2013-02-14 16:43:04+00:00)
Title: Broken rlm_redis in master branch

Ahem, it's pretty clear no-one is using rlm_redis in master :-(

~~~
static void *redis_create_conn(void *ctx)
{
REDIS_INST *inst = ctx;
REDISSOCK *dissocket = NULL;
redisContext *conn;
char buffer[1024];

conn = redisConnect(inst->hostname, inst->port);
if (dissocket->conn->err) return NULL;
~~~

That last line unconditionally segfaults, because dissocket is null.

This branch includes:

* a fix for the segfault
* a fix for obsolete config

~~~~
(0) rediswho : WARNING: Deprecated conditional expansion ":-". See "man unlang" for details
(0) rediswho : WARNING: Unknown module "Acct-Input-Gigawords" in string expansion "%,%{Acct-Output-Gigawords:-0},%{Acct-Input-Octets:-0},%{Acct-Output-Octets:-0}"
rediswho_command: xlat failed on: 'LPUSH brian 1360858175,,127.0.0.1,,1.2.3.4,'
~~~~

* fixes for broken "trim" command, which was ignoring the trim-count setting
* return `RLM_MODULE_FAIL` instead of -1
* remove an unused variable
* plus one feature: the ability to set insert/trim/expire independently (previously if you didn't set all three, it ignored them)