aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_tcp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-28 13:37:22 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-28 13:37:22 +0100
commit04127efebacaaa088668198cdbe52f933367b731 (patch)
tree5e19bd17ac25d675666f53b19f746681a57e89da /src/lua/lua_tcp.c
parent8e5517a62b981fedc9e42d1323b066fadf086f1a (diff)
downloadrspamd-04127efebacaaa088668198cdbe52f933367b731.tar.gz
rspamd-04127efebacaaa088668198cdbe52f933367b731.zip
[Fix] Distinguish remote and local addrs parsing
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 18c022c38..379d3d807 100644
--- a/src/lua/lua_tcp.c
+++ b/src/lua/lua_tcp.c
@@ -1760,7 +1760,8 @@ lua_tcp_request (lua_State *L)
}
}
- if (rspamd_parse_inet_address (&cbd->addr, host, strlen (host))) {
+ if (rspamd_parse_inet_address (&cbd->addr,
+ host, strlen (host), RSPAMD_INET_ADDRESS_PARSE_DEFAULT)) {
rspamd_inet_address_set_port (cbd->addr, port);
/* Host is numeric IP, no need to resolve */
lua_tcp_register_watcher (cbd);
@@ -1942,7 +1943,8 @@ lua_tcp_connect_sync (lua_State *L)
}
}
- if (rspamd_parse_inet_address (&cbd->addr, host, strlen (host))) {
+ if (rspamd_parse_inet_address (&cbd->addr,
+ host, strlen (host), RSPAMD_INET_ADDRESS_PARSE_DEFAULT)) {
rspamd_inet_address_set_port (cbd->addr, (guint16)port);
/* Host is numeric IP, no need to resolve */
if (!lua_tcp_make_connection (cbd)) {