aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-11-25 12:50:02 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-11-25 12:50:02 +0000
commit6af040cf2949ce0eebe52121efef6bb3ce4bcc54 (patch)
tree869ca667a132933cdb3ebff1006986b04bb0a97d /contrib
parent65967cdddf5ff8d858ff070bdc7885482408d2b7 (diff)
downloadrspamd-6af040cf2949ce0eebe52121efef6bb3ce4bcc54.tar.gz
rspamd-6af040cf2949ce0eebe52121efef6bb3ce4bcc54.zip
[Fix] Do not try to connect to non-supported addresses
Diffstat (limited to 'contrib')
-rw-r--r--contrib/hiredis/net.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/hiredis/net.c b/contrib/hiredis/net.c
index e4aa920ad..6aada0a6f 100644
--- a/contrib/hiredis/net.c
+++ b/contrib/hiredis/net.c
@@ -310,6 +310,10 @@ static int _redisContextConnectTcp(redisContext *c, const char *addr, int port,
memset(&hints,0,sizeof(hints));
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_STREAM;
+ if (!blocking) {
+ /* Rspamd specific: never try to resolve on non-blocking conn requests */
+ hints.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV;
+ }
/* Try with IPv6 if no IPv4 address was found. We do it in this order since
* in a Redis client you can't afford to test if you have IPv6 connectivity