]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: config: make sure to associate the proper mux to bind and servers
authorWilly Tarreau <w@1wt.eu>
Sun, 2 Dec 2018 12:09:09 +0000 (13:09 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 2 Dec 2018 12:29:35 +0000 (13:29 +0100)
commit76a551de2e3bb41313f8cdc808ed12f982076549
treee560df06fc788cc37df5c8522c54b3c23b27f51a
parent3fbea1d8d097ac937f98f03e94199574a81bcd03
MINOR: config: make sure to associate the proper mux to bind and servers

Currently a mux may be forced on a bind or server line by specifying the
"proto" keyword. The problem is that the mux may depend on the proxy's
mode, which is not known when parsing this keyword, so a wrong mux could
be picked.

Let's simply update the mux entry while checking its validity. We do have
the name and the side, we only need to see if a better mux fits based on
the proxy's mode. It also requires to remove the side check while parsing
the "proto" keyword since a wrong mux could be picked.

This way it becomes possible to declare multiple muxes with the same
protocol names and different sides or modes.
src/cfgparse.c
src/listener.c
src/server.c