summaryrefslogtreecommitdiffstats
path: root/src/lua/lua_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/lua_config.c')
-rw-r--r--src/lua/lua_config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c
index d535f0a1e..5116fff93 100644
--- a/src/lua/lua_config.c
+++ b/src/lua/lua_config.c
@@ -1508,7 +1508,7 @@ lua_radix_get_key (lua_State * L)
ud = luaL_checkudata (L, 2, "rspamd{ip}");
if (ud != NULL) {
addr = *((struct rspamd_lua_ip **)ud);
- if (!addr->is_valid) {
+ if (addr->addr == NULL) {
msg_err ("rspamd{ip} is not valid");
addr = NULL;
}
@@ -1519,7 +1519,7 @@ lua_radix_get_key (lua_State * L)
}
if (addr != NULL) {
- if (radix_find_compressed_addr (radix, &addr->addr)
+ if (radix_find_compressed_addr (radix, addr->addr)
!= RADIX_NO_VALUE) {
ret = TRUE;
}