]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: checks: Don't lose warning on proxy capability
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 28 Apr 2020 08:47:28 +0000 (10:47 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 28 Apr 2020 08:47:30 +0000 (10:47 +0200)
When a tcp-check line is parsed, a warning may be reported if the keyword is
used for a frontend. The return value must be used to report it. But this info
is lost before the end of the function.

Partly fixes issue #600. No backport needed.

src/checks.c

index 183b42fc686540585e3252f3af1594f7d7f33e38..d1d5cdda024e875913a4bfbf61e89518ff291298 100644 (file)
@@ -5566,7 +5566,7 @@ static int proxy_parse_tcpcheck(char **args, int section, struct proxy *curpx,
                memprintf(errmsg, "'%s %s' : %s.", args[0], args[1], *errmsg);
                goto error;
        }
-       ret = (*errmsg != NULL); /* Handle warning */
+       ret = (ret || (*errmsg != NULL)); /* Handle warning */
 
        /* No error: add the tcp-check rule in the list */
        chk->index = index;