From d89cc8bfc07702e4ce7ab818b4fc4483ef6e63bc Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 27 Feb 2019 16:53:33 +0100 Subject: [PATCH] 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. --- src/proxy.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/proxy.c b/src/proxy.c index d3c069882..7f442b9da 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); }