]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: tcpcheck: conf parsing error when no port configured on server and last...
authorBaptiste Assmann <bedis9@gmail.com>
Fri, 4 Dec 2015 05:57:25 +0000 (06:57 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 4 Dec 2015 06:48:35 +0000 (07:48 +0100)
commit3dd73bea64dcbaa04858cb256c2230dbf3da58e8
tree04e796531017ccf1ea85a3e77d855f3f7aaa77d3
parentb65e0335d988f80e4e93f31f7331fb74db1f07b0
BUG/MINOR: tcpcheck: conf parsing error when no port configured on server and last rule is a CONNECT with no port

Current configuration parsing is permissive in such situation:
A server in a backend with no port conigured on the IP address
statement, no 'port' parameter configured and last rule of a tcp-check
is a CONNECT with no port.

The current code currently parses all the rules to validate a port is
well available, but it misses the last one, which means such
configuration is valid:

  backend b
   option tcp-check
   tcp-check connect port 8444
   tcp-check connect
   server s 127.0.0.1 check

the second connect tentative is sent to port '0'...

Current patch fixes this by parsing the list the right way, including
the last rule.

backport status: 1.6 and above
src/server.c