From 46e4d866d4aefaa1f5a82fc471966a364da9a49a Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 29 Apr 2009 17:24:00 +0400 Subject: * Allow binds to INADDR_ANY if bind_sock is *:port --- src/cfg_utils.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/cfg_utils.c') diff --git a/src/cfg_utils.c b/src/cfg_utils.c index 4907ce64c..79fabdb50 100644 --- a/src/cfg_utils.c +++ b/src/cfg_utils.c @@ -167,8 +167,10 @@ parse_bind_line (struct config_file *cf, char *str, enum rspamd_cred_type type) return 0; } } - - if (!inet_aton (cur_tok, addr)) { + if (strcmp (cur_tok, "*") == 0) { + *host = memory_pool_strdup (cf->cfg_pool, cur_tok); + addr->s_addr = htonl (INADDR_ANY); + } else if (!inet_aton (cur_tok, addr)) { /* Try to call gethostbyname */ hent = gethostbyname (cur_tok); if (hent == NULL) { -- cgit v1.2.3