From: Willy Tarreau Date: Wed, 23 Jan 2013 23:31:24 +0000 (+0100) Subject: BUG/MINOR: config: check the proper variable when parsing log minlvl X-Git-Tag: v1.5-dev18~120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7f057bab90ea634b3e5c9c127c8b1c6151368f8;p=thirdparty%2Fhaproxy.git BUG/MINOR: config: check the proper variable when parsing log minlvl logsrv->minlvl gets the numeric log level from the equivalent string. Upon error, ->level was checked due to a wrong copy-paste. The effect is that a wrong name will silently be ignored and due to minlvl=-1, will act as if the option was not set. No backport is needed, this is 1.5-specific. Reported-by: Dinko Korunic --- diff --git a/src/cfgparse.c b/src/cfgparse.c index 718664c0f5..949114792f 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -4785,7 +4785,7 @@ stats_error_parsing: logsrv->minlvl = 0; /* limit syslog level to this level (emerg) */ if (*(args[4])) { logsrv->minlvl = get_log_level(args[4]); - if (logsrv->level < 0) { + if (logsrv->minlvl < 0) { Alert("parsing [%s:%d] : unknown optional minimum log level '%s'\n", file, linenum, args[4]); err_code |= ERR_ALERT | ERR_FATAL; goto out;