From: Christopher Faulet Date: Mon, 27 Apr 2020 16:29:49 +0000 (+0200) Subject: BUG/MINOR: checks: Fix PostgreSQL regex on the authentication packet X-Git-Tag: v2.2-dev7~69 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b841c74aad63d7bf309f61d8fd38493dd1f318f4;p=thirdparty%2Fhaproxy.git BUG/MINOR: checks: Fix PostgreSQL regex on the authentication packet For PostgreSQL health check, there is a regex on the backend authentication packet. It must match to succeed. But it exists 6 types of authentication packets and the regex only matches the first one (AuthenticationOK). This patch fixes the regex to match all authentication packets. No backport needed. --- diff --git a/src/checks.c b/src/checks.c index d17302a969..36aa71883c 100644 --- a/src/checks.c +++ b/src/checks.c @@ -6224,7 +6224,7 @@ int proxy_parse_pgsql_check_opt(char **args, int cur_arg, struct proxy *curpx, s chk->index = 2; LIST_ADDQ(&rs->rules, &chk->list); - chk = parse_tcpcheck_expect((char *[]){"tcp-check", "expect", "rbinary", "^520000000800000000", + chk = parse_tcpcheck_expect((char *[]){"tcp-check", "expect", "rbinary", "^52000000(08|0A|0C)000000(00|02|03|04|05|06)", "min-recv", "9", "error-status", "L7STS", "on-success", "PostgreSQL server is ok",