From: Cyril Bonté Date: Fri, 23 Jul 2010 16:59:11 +0000 (+0200) Subject: [BUG] stats: session rate limit gets garbaged in the stats X-Git-Tag: v1.5-dev8~490 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d179ebd21b768bffee9cb28baa81a517dd7ac50;p=thirdparty%2Fhaproxy.git [BUG] stats: session rate limit gets garbaged in the stats The statistics page (the HTML one) displays a garbage value on frontends using "rate-limit session" in HTTP mode. This is due to the usage of the same buffer for the macros converting the max session rate and the limit. Steps to reproduce : Configuration file example : listen bug :80 mode http rate-limit sessions stats enable Then start refreshing the statistics page. This bug was introduced just before the release of haproxy 1.4.0. (was commit 6cfaf9e91969c87a9eab1d58a15d2d0a3f346c9b in 1.4) --- diff --git a/src/dumpstats.c b/src/dumpstats.c index 526e0f575e..f8ba702e34 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -1601,7 +1601,7 @@ int stats_dump_proxy(struct session *s, struct proxy *px, struct uri_auth *uri) read_freq_ctr(&px->fe_req_per_sec), U2H0(read_freq_ctr(&px->fe_sess_per_sec)), px->counters.fe_rps_max, - U2H2(px->counters.fe_sps_max), + U2H1(px->counters.fe_sps_max), LIM2A2(px->fe_sps_lim, "-")); } else { chunk_printf(&msg,