]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[BUG] check if rise/fall has an argument and it is > 0
authorKrzysztof Piotr Oledzki <ole@ans.pl>
Sun, 27 Sep 2009 14:17:31 +0000 (16:17 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 3 Oct 2009 17:31:36 +0000 (19:31 +0200)
commit5e947894afd592e6bdcabc40b1ee5cf9d9cb0175
treec8f95c37ef4d71d729635125e53f1fc7fe502fdf
parent974b12d7ed77611418a8d74a2f162cdc92c4f6f9
[BUG] check if rise/fall has an argument and it is > 0

Check if rise/fall has an argument and it is > 0  or bad things may happen
in the health checks. ;)

Now it is verified and the code no longer allows for such condition:

backend bad
(...)
        server o-f0 192.168.129.27:80 check inter 4000 source 0.0.0.0 rise 0
        server o-r0 192.168.129.27:80 check inter 4000 source 0.0.0.0 fall 0
        server o-f1 192.168.129.27:80 check inter 4000 source 0.0.0.0 rise
        server o-r1 192.168.129.27:80 check inter 4000 source 0.0.0.0 fall

[ALERT] 269/161830 (24136) : parsing [../git/haproxy.cfg:98]: 'rise' has to be > 0.
[ALERT] 269/161830 (24136) : parsing [../git/haproxy.cfg:99]: 'fall' has to be > 0.
[ALERT] 269/161830 (24136) : parsing [../git/haproxy.cfg:100]: 'rise' expects an integer argument.
[ALERT] 269/161830 (24136) : parsing [../git/haproxy.cfg:101]: 'fall' expects an integer argument.

Also add endline in the custom id checking code.

(cherry picked from commit 08ff959c3eaaac89efb38f249f095a8b0d04ef47)
src/cfgparse.c