aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_tcp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-09 08:57:09 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-09 08:57:09 +0100
commitd2392c19032a785a96cb32b02043b0ecf4dc6afc (patch)
treefeeab778e8c6f533d9db47a727e934ad8dceed25 /src/lua/lua_tcp.c
parent7b094aea65622299db13268222c0bfec4104882e (diff)
downloadrspamd-d2392c19032a785a96cb32b02043b0ecf4dc6afc.tar.gz
rspamd-d2392c19032a785a96cb32b02043b0ecf4dc6afc.zip
[Fix] Fix usage of rdns reply structure
Issue: #654 Reported by: @AlexeySa
Diffstat (limited to 'src/lua/lua_tcp.c')
-rw-r--r--src/lua/lua_tcp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lua/lua_tcp.c b/src/lua/lua_tcp.c
index e6ccd85ee..094ebf12b 100644
--- a/src/lua/lua_tcp.c
+++ b/src/lua/lua_tcp.c
@@ -348,10 +348,12 @@ static void
lua_tcp_dns_handler (struct rdns_reply *reply, gpointer ud)
{
struct lua_tcp_cbdata *cbd = (struct lua_tcp_cbdata *)ud;
+ const struct rdns_request_name *rn;
if (reply->code != RDNS_RC_NOERROR) {
+ rn = rdns_request_get_name (reply->request, NULL);
lua_tcp_push_error (cbd, "unable to resolve host: %s",
- reply->requested_name);
+ rn->name);
lua_tcp_maybe_free (cbd);
}
else {
@@ -368,7 +370,7 @@ lua_tcp_dns_handler (struct rdns_reply *reply, gpointer ud)
if (!lua_tcp_make_connection (cbd)) {
lua_tcp_push_error (cbd, "unable to make connection to the host %s",
- reply->requested_name);
+ rspamd_inet_address_to_string (cbd->addr));
lua_tcp_maybe_free (cbd);
}
}