From: Christopher Faulet Date: Wed, 19 Oct 2022 14:26:21 +0000 (+0200) Subject: BUG/MINOR: ring: Properly parse connect timeout X-Git-Tag: v2.7-dev9~154 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=321d100cc8f86e5713fa7325acb30ef0e962d900;p=thirdparty%2Fhaproxy.git BUG/MINOR: ring: Properly parse connect timeout The connect timeout in a ring section was not properly parsed. Thus, it was never set and the server timeout may be overwritten, depending on the directives order. The first char of the keyword must be tested, not the third one. This patch is related to the issue #1900. But it does not fix the issue. It must be backported as far as 2.4. --- diff --git a/src/sink.c b/src/sink.c index 29c38764db..23cffc6767 100644 --- a/src/sink.c +++ b/src/sink.c @@ -994,7 +994,7 @@ int cfg_parse_ring(const char *file, int linenum, char **args, int kwm) err_code |= ERR_ALERT | ERR_FATAL; goto err; } - if (args[1][2] == 'c') + if (args[1][0] == 'c') cfg_sink->forward_px->timeout.connect = tout; else cfg_sink->forward_px->timeout.server = tout;