diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-06-03 16:52:47 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-06-03 16:52:47 +0100 |
commit | 9c8bdabc2095d1a0dc596319d3495f9fb2118d1a (patch) | |
tree | 6579720a9fd6beee866a7791dff4a685244f8b5d /src/cfg_utils.c | |
parent | 813f1f407f639c1f025298abae9fd0295a30d24c (diff) | |
download | rspamd-9c8bdabc2095d1a0dc596319d3495f9fb2118d1a.tar.gz rspamd-9c8bdabc2095d1a0dc596319d3495f9fb2118d1a.zip |
Fix wildcard addresses in config.
Diffstat (limited to 'src/cfg_utils.c')
-rw-r--r-- | src/cfg_utils.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/cfg_utils.c b/src/cfg_utils.c index 78530218d..bb673c7d9 100644 --- a/src/cfg_utils.c +++ b/src/cfg_utils.c @@ -71,8 +71,12 @@ parse_host_port_priority (memory_pool_t *pool, const gchar *str, gchar **addr, g hints.ai_next = NULL; if (strcmp (tokens[0], "*") == 0) { - cur_tok = NULL; - hints.ai_flags |= AI_PASSIVE; + /* XXX: actually we still cannot listen on multiply protocols */ + if (pool != NULL) { + *addr = memory_pool_alloc (pool, INET_ADDRSTRLEN + 1); + } + rspamd_strlcpy (*addr, "0.0.0.0", INET_ADDRSTRLEN + 1); + goto port_parse; } else { cur_tok = tokens[0]; @@ -99,6 +103,8 @@ parse_host_port_priority (memory_pool_t *pool, const gchar *str, gchar **addr, g msg_err ("address resolution for %s failed: %s", tokens[0], gai_strerror (r)); goto err; } + +port_parse: if (tokens[1] != NULL) { /* Port part */ if (port != NULL) { |