]> source.dussan.org Git - rspamd.git/commitdiff
Fix sockets initialization.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 13 Mar 2015 10:21:19 +0000 (10:21 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 13 Mar 2015 10:21:19 +0000 (10:21 +0000)
src/libserver/cfg_utils.c
src/libutil/addr.c

index 19fac3488b39701c727517b4820592b28d6bba26..983a73f3fc03de124c78b87b541da2858a1729bf 100644 (file)
@@ -130,6 +130,7 @@ rspamd_parse_bind_line (struct rspamd_config *cfg,
                        ret = FALSE;
                }
                else {
+                       cnf->cnt = cnf->addrs->len;
                        LL_PREPEND (cf->bind_conf, cnf);
                }
        }
index c2bb3db9c66213ea67fc6ffdd92eab4931d85d7d..1cfe2992b8413646f3b4f20036602d47d5af10da 100644 (file)
@@ -77,6 +77,9 @@ rspamd_ip_validate_af (rspamd_inet_addr_t *addr)
                        addr->u.in.addr.sa.sa_family = addr->af;
                }
        }
+       else {
+               addr->u.un->addr.sun_family = AF_UNIX;
+       }
 
        if (addr->af == AF_INET) {
                addr->slen = sizeof (struct sockaddr_in);
@@ -320,6 +323,7 @@ rspamd_parse_unix_path (rspamd_inet_addr_t **target, const char *src)
        }
 
        if (target) {
+               rspamd_ip_validate_af (addr);
                *target = addr;
        }
        else {