BUG/MINOR: tcp: Don't alter counters returned by tcp info fetchers
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 17 Oct 2019 12:40:48 +0000 (14:40 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 17 Oct 2019 13:20:06 +0000 (15:20 +0200)
commitba0c53ef71cd7d2b344de318742d0ef239fd34e4
tree3d7ebc44fcd46bd9950b8a59793b650a78e672fe
parent5fdb5b36e1e0bef9b8a79c3550bd7a8751bac396
BUG/MINOR: tcp: Don't alter counters returned by tcp info fetchers

There are 2 kinds of tcp info fetchers. Those returning a time value (fc_rtt and
fc_rttval) and those returning a counter (fc_unacked, fc_sacked, fc_retrans,
fc_fackets, fc_lost, fc_reordering). Because of a bug, the counters were handled
as time values, and by default, were divided by 1000 (because of an invalid
conversion from us to ms). To work around this bug and have the right value, the
argument "us" had to be specified.

So now, tcp info fetchers returning a counter don't support any argument
anymore. To not break old configurations, if an argument is provided, it is
ignored and a warning is emitted during the configuration parsing.

In addition, parameter validiation is now performed during the configuration
parsing.

This patch must be backported as far as 1.7.
doc/configuration.txt
src/proto_tcp.c