MINOR: server: Make 'default-server' support 'sni' keyword.
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 20 Mar 2017 13:54:41 +0000 (14:54 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 27 Mar 2017 12:37:01 +0000 (14:37 +0200)
commit9a146de934e80f27d2bb54c62c8de472987dcb63
tree241ad8b544ad43a006554e00d6f633bca6891f97
parentdba9707713eb49a39b218f331c252fb09494c566
MINOR: server: Make 'default-server' support 'sni' keyword.

This patch makes 'default-server' directives support 'sni' settings.
A field 'sni_expr' has been added to 'struct server' to temporary
stores SNI expressions as strings during both 'default-server' and 'server'
lines parsing. So, to duplicate SNI expressions from 'default-server' 'sni' setting
for new 'server' instances we only have to "strdup" these strings as this is
often done for most of the 'server' settings.
Then, sample expressions are computed calling sample_parse_expr() (only for 'server'
instances).
A new function has been added to produce the same error output as before in case
of any error during 'sni' settings parsing (display_parser_err()).
Should not break anything.
include/types/server.h
src/server.c
src/ssl_sock.c