From: Cyril Bonté Date: Tue, 23 Feb 2016 23:14:54 +0000 (+0100) Subject: BUG/MEDIUM: stats: stats bind-process doesn't propagate the process mask correctly X-Git-Tag: v1.7-dev2~77 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0618195a114098c93e2712b5507dc9a3eeae8e8b;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: stats: stats bind-process doesn't propagate the process mask correctly With nbproc > 1, it is possible to specify on which process the stats socket will be bound using "stats bind-process", but the behaviour was not correct, ignoring the value in some configurations. Example : global nbproc 4 stats bind-process 1 stats socket /var/run/haproxy.sock With such a configuration, all the processes will listen on the stats socket. As a workaround, it is also possible to declare a "process" keyword on the "stats stocket" line. The patch must be applied to 1.7, 1.6 and 1.5 --- diff --git a/src/cfgparse.c b/src/cfgparse.c index dd6f8a23f8..c55a56161f 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -8647,7 +8647,7 @@ out_uri_auth_compat: list_for_each_entry(bind_conf, &global.stats_fe->conf.bind, by_fe) { unsigned long mask; - mask = bind_conf->bind_proc ? bind_conf->bind_proc : nbits(global.nbproc); + mask = bind_conf->bind_proc ? bind_conf->bind_proc : 0; global.stats_fe->bind_proc |= mask; } if (!global.stats_fe->bind_proc)