From: cebka@lenovo-laptop Date: Mon, 15 Mar 2010 18:00:38 +0000 (+0300) Subject: * Parse '*' in host name from config file correctly X-Git-Tag: 0.3.0~62 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2e890cdbf4d8e8ed77a4c77cacbf346da9325207;p=thirdparty%2Frspamd.git * Parse '*' in host name from config file correctly --- diff --git a/rspamc.pl.in b/rspamc.pl.in index efadde0a2b..6aca04d0d7 100755 --- a/rspamc.pl.in +++ b/rspamc.pl.in @@ -122,7 +122,12 @@ sub parse_config { if (!$skip && ((!$is_ctrl && !$ctrl) || ($ctrl && $is_ctrl)) && $_ =~ /^\s*bind_socket\s*=\s*((([^:]+):(\d+))|(\/\S*))/i) { if ($3 && $4) { - $cfg{'hosts'} = [ "$3:$4" ]; + if ($3 eq '*') { + $cfg{'hosts'} = [ "127.0.0.1:$4" ]; + } + else { + $cfg{'hosts'} = [ "$3:$4" ]; + } } else { $cfg{'hosts'} = [ "$5" ];