From: Arran Cudbard-Bell Date: Wed, 24 Mar 2021 19:39:48 +0000 (+0000) Subject: Fix issue with delete command that caused entries to remain if the address had never... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f36bb78def66a7a369a494412255b516dba25764;p=thirdparty%2Ffreeradius-server.git Fix issue with delete command that caused entries to remain if the address had never been used --- diff --git a/src/modules/rlm_redis_ippool/rlm_redis_ippool_tool.c b/src/modules/rlm_redis_ippool/rlm_redis_ippool_tool.c index 772e7c0d075..c0fdd66c36e 100644 --- a/src/modules/rlm_redis_ippool/rlm_redis_ippool_tool.c +++ b/src/modules/rlm_redis_ippool/rlm_redis_ippool_tool.c @@ -186,10 +186,10 @@ static char lua_remove_cmd[] = "ret = redis.call('ZREM', '{' .. KEYS[1] .. '}:"IPPOOL_POOL_KEY"', ARGV[1])" EOL /* 4 */ "address_key = '{' .. KEYS[1] .. '}:"IPPOOL_ADDRESS_KEY":' .. ARGV[1]" EOL /* 5 */ "found = redis.call('HGET', address_key, 'device')" EOL /* 6 */ - "if not found then" EOL /* 7 */ - " return ret" EOL /* 8 */ - "end" EOL /* 9 */ - "redis.call('DEL', address_key)" EOL /* 10 */ + "redis.call('DEL', address_key)" EOL /* 7 */ + "if not found then" EOL /* 8 */ + " return ret" EOL /* 9 */ + "end" EOL /* 10 */ /* * Remove the association between the device and a lease