]> 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:18:45 +0000 (10:18 +0100)
src/libutil/addr.c

index ee70a90f4ee3cdb318df20eb4e7b91568fe16927..9a278a432e3ca68f4fc3b7e3952905cd4ec41ed9 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 {