]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: tools: make parse_time_err() more strict on the timer validity
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 11 Dec 2020 08:23:07 +0000 (09:23 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 11 Dec 2020 11:01:04 +0000 (12:01 +0100)
commitc20ad0d8dbd1bb5707bbfe23632415c3062e046c
tree790a909cae681de669b34641216de608e7fa54bc
parentcad5f5e1ede350e92a0e0b1626d636f1c70c646d
BUG/MINOR: tools: make parse_time_err() more strict on the timer validity

First, an error is now reported if the first character is not a digit. Thus,
"timeout client s" triggers an error now. Then 'u' is also rejected
now. 'us' is valid and should be used set the timer in microseconds. However
'u' alone is not a valid unit. It was just ignored before (default to
milliseconds). Now, it is an error. Finally, a warning is reported if the
end of the text is not reached after the timer parsing. This warning will
probably be switched to an error in a futur version.

This patch must be backported to all stable versions.
src/tools.c