BUG/MEDIUM: cfgparse: wrong argument offset after parsing server "sni" keyword
authorCyril Bonté <cyril.bonte@free.fr>
Mon, 7 Mar 2016 21:13:22 +0000 (22:13 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 7 Mar 2016 22:47:05 +0000 (23:47 +0100)
commit23d19d669b263ef3878eb7c03a26c6c1dc45ec9e
tree951d61f82d6a8714f4c189f35641be14f76bb037
parenta3aa9e6840fa0bc7a74f3cab7400dcb33ad4537a
BUG/MEDIUM: cfgparse: wrong argument offset after parsing server "sni" keyword

Owen Marshall reported an issue depending on the server keywords order in the
configuration.

Working line :
  server dev1 <ip>:<port> check inter 5000 ssl verify none sni req.hdr(Host)

Non working line :
  server dev1 <ip>:<port> check inter 5000 ssl sni req.hdr(Host) verify none

Indeed, both parse_server() and srv_parse_sni() modified the current argument
offset at the same time. To fix the issue, srv_parse_sni() can work on a local
copy ot the offset, leaving parse_server() responsible of the actual value.

This fix must be backported to 1.6.
src/ssl_sock.c