summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-24 10:18:45 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-24 10:18:45 +0100
commitaf3af1f70ca37ebdff254debd3219188427a13a4 (patch)
treed8e766d42e4a323a91968ba2010865329c927347
parentd2e088ead2cad3fdcdd974ca722d294cbaf1bb80 (diff)
downloadrspamd-af3af1f70ca37ebdff254debd3219188427a13a4.tar.gz
rspamd-af3af1f70ca37ebdff254debd3219188427a13a4.zip
[CritFix] Fix accepting on IPv6 sockets
-rw-r--r--src/libutil/addr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libutil/addr.c b/src/libutil/addr.c
index ee70a90f4..9a278a432 100644
--- a/src/libutil/addr.c
+++ b/src/libutil/addr.c
@@ -280,6 +280,11 @@ rspamd_accept_from_socket (gint sock, rspamd_inet_addr_t **target,
sizeof (struct in6_addr));
}
}
+ else {
+ addr = rspamd_inet_addr_create (AF_INET6);
+ memcpy (&addr->u.in.addr.s6.sin6_addr, &su.s6.sin6_addr,
+ sizeof (struct in6_addr));
+ }
}
else {