From: Willy Tarreau Date: Wed, 27 Feb 2019 15:53:33 +0000 (+0100) Subject: MINOR: proxy: do not change the listeners' maxconn when updating the frontend's X-Git-Tag: v2.0-dev2~143 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d89cc8bfc07702e4ce7ab818b4fc4483ef6e63bc;p=thirdparty%2Fhaproxy.git MINOR: proxy: do not change the listeners' maxconn when updating the frontend's It is possible to update a frontend's maxconn from the CLI. Unfortunately when doing this it scratches all listeners' maxconn values and sets them all to the new frontend's value. This can be problematic when mixing different traffic classes (bind to interface or private networks, etc). Now that the listener's maxconn is allowed to remain unset, let's not change these values when setting the frontend's maxconn. This way the overall frontend's limit can be raised but if certain specific listeners had their own value forced in the config, they will be preserved. This makes more sense and is more in line with the principle of defaults propagation. --- diff --git a/src/proxy.c b/src/proxy.c index d3c0698824..7f442b9da9 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -1884,8 +1884,6 @@ static int cli_parse_set_maxconn_frontend(char **args, char *payload, struct app px->maxconn = v; list_for_each_entry(l, &px->conf.listeners, by_fe) { - if (l->maxconn) - l->maxconn = v; if (l->state == LI_FULL) resume_listener(l); }