diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-05 16:20:59 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-05 16:20:59 +0100 |
commit | 62f9156987d30770f5314041a6b0fb6c4383a460 (patch) | |
tree | ec1a84628e258c401ac04bc7a9ed66800a2503a9 /src | |
parent | 3a0280eca85f656f74c9a13b94e4a39df1085d29 (diff) | |
download | rspamd-62f9156987d30770f5314041a6b0fb6c4383a460.tar.gz rspamd-62f9156987d30770f5314041a6b0fb6c4383a460.zip |
[Minor] Log place where we got bad IP when checking maps
Diffstat (limited to 'src')
-rw-r--r-- | src/lua/lua_map.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lua/lua_map.c b/src/lua/lua_map.c index 9c90cdf55..b28543c07 100644 --- a/src/lua/lua_map.c +++ b/src/lua/lua_map.c @@ -781,7 +781,6 @@ lua_map_get_key (lua_State * L) if (lua_type (L, 2) == LUA_TSTRING) { const gchar *addr_str; - gsize len; addr_str = luaL_checklstring (L, 2, &len); addr = g_alloca (sizeof (*addr)); @@ -789,7 +788,8 @@ lua_map_get_key (lua_State * L) if (!rspamd_parse_inet_address_ip (addr_str, len, addr->addr)) { addr = NULL; - msg_err ("invalid ip address: %*s", (gint)len, addr_str); + msg_warn ("invalid ip address: %*s, when checking map: %s", + (gint)len, addr_str, map->map->name); } } else if (lua_type (L, 2) == LUA_TUSERDATA) { @@ -806,7 +806,7 @@ lua_map_get_key (lua_State * L) } } else if (lua_type (L, 2) == LUA_TNUMBER) { - key_num = luaL_checknumber (L, 2); + key_num = luaL_checkinteger (L, 2); key_num = htonl (key_num); } |