]> source.dussan.org Git - rspamd.git/commitdiff
[CritFix] Fix accepting on IPv6 sockets
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 24 May 2017 09:18:45 +0000 (10:18 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 24 May 2017 09:19:22 +0000 (10:19 +0100)
src/libutil/addr.c

index 54988cf49bc0bd0b62307ddde6d7aba7073bab55..082cbb9414203ea66a795625de04830cd384cc03 100644 (file)
@@ -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 {