aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-13 10:21:19 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-13 10:21:19 +0000
commit8d9516871b70786a63f80601dbe7336cf7e3a138 (patch)
treefc1412e4331461e33908080528fe6c615ec31722 /src
parent074d28ebc2c4b5ab952e74b9a815e0a55c26110a (diff)
downloadrspamd-8d9516871b70786a63f80601dbe7336cf7e3a138.tar.gz
rspamd-8d9516871b70786a63f80601dbe7336cf7e3a138.zip
Fix sockets initialization.
Diffstat (limited to 'src')
-rw-r--r--src/libserver/cfg_utils.c1
-rw-r--r--src/libutil/addr.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c
index 19fac3488..983a73f3f 100644
--- a/src/libserver/cfg_utils.c
+++ b/src/libserver/cfg_utils.c
@@ -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);
}
}
diff --git a/src/libutil/addr.c b/src/libutil/addr.c
index c2bb3db9c..1cfe2992b 100644
--- a/src/libutil/addr.c
+++ b/src/libutil/addr.c
@@ -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 {