case 'i':
case 'I':
if (g_ascii_strncasecmp (headern, IP_ADDR_HEADER, hlen) == 0) {
- if (!rspamd_parse_inet_address (&task->from_addr, hv->str, 0)) {
+ if (!rspamd_parse_inet_address (&task->from_addr, hv->str, hv->len)) {
msg_err_task ("bad ip header: '%V'", hv);
return FALSE;
}
rspamd_session_watcher_push (session);
}
- if (rspamd_parse_inet_address (&cbd->addr, msg->host->str, 0)) {
+ if (rspamd_parse_inet_address (&cbd->addr, msg->host->str, msg->host->len)) {
/* Host is numeric IP, no need to resolve */
if (!lua_http_make_connection (cbd)) {
lua_http_maybe_free (cbd);