]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: peers: fix incorrect age in frequency counters
authorWilly Tarreau <w@1wt.eu>
Fri, 25 Mar 2016 17:17:47 +0000 (18:17 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 25 Mar 2016 17:17:47 +0000 (18:17 +0100)
commit3bb46177aca45f1b14f11c49683ab297d7f6f660
treedc257d16b85d3ca3eb54e1fbe916c5dde03d0bd6
parent42ff05e2d3d10e8a1e070e66e8883c5eabe196d7
BUG/MEDIUM: peers: fix incorrect age in frequency counters

The frequency counters's window start is sent as "now - freq.date",
which is a positive age compared to the current date. But on receipt,
this age was added to the current date instead of subtracted. So
since the date was always in the future, they were always expired if
the activity changed side in less than the counter's measuring period
(eg: 10s).

This bug was reported by Christian Ruppert who also provided an easy
reproducer.

It needs to be backported to 1.6.
src/peers.c