aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_http.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-05-31 17:45:18 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-05-31 17:45:18 +0100
commit8cc2aee8859731ee2fe280070423f79e7d009ca3 (patch)
tree76951e59a1285c02ae50a89cbf69fcbb11f89b6b /src/lua/lua_http.c
parent7b3682ce3c78d26dd75782f931611bd09bcc76a5 (diff)
downloadrspamd-8cc2aee8859731ee2fe280070423f79e7d009ca3.tar.gz
rspamd-8cc2aee8859731ee2fe280070423f79e7d009ca3.zip
Use getaddrinfo when opening sockets.
Diffstat (limited to 'src/lua/lua_http.c')
-rw-r--r--src/lua/lua_http.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/lua_http.c b/src/lua/lua_http.c
index 73d916244..8fc5c3e2c 100644
--- a/src/lua/lua_http.c
+++ b/src/lua/lua_http.c
@@ -302,7 +302,7 @@ lua_http_dns_callback (struct rspamd_dns_reply *reply, gpointer arg)
elt = reply->elements->data;
memcpy (&ina, &elt->a.addr[0], sizeof (struct in_addr));
- ud->fd = make_tcp_socket (&ina, ud->port, FALSE, TRUE);
+ ud->fd = make_universal_stream_socket (inet_ntoa (ina), ud->port, TRUE, FALSE, FALSE);
if (ud->fd == -1) {
lua_http_push_error (450, ud);
@@ -473,7 +473,7 @@ lua_http_make_request_common_new (lua_State *L, struct rspamd_async_session *ses
return 1;
}
- ud->fd = make_tcp_socket (&ina, ud->port, FALSE, TRUE);
+ ud->fd = make_universal_stream_socket (inet_ntoa (ina), ud->port, TRUE, FALSE, FALSE);
if (ud->fd == -1) {
luaL_unref (L, LUA_REGISTRYINDEX, cbref);