]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: proxy: do not change the listeners' maxconn when updating the frontend's
authorWilly Tarreau <w@1wt.eu>
Wed, 27 Feb 2019 15:53:33 +0000 (16:53 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 28 Feb 2019 16:05:32 +0000 (17:05 +0100)
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

index d3c0698824986de9919bc913d6a002a3ba8e44d4..7f442b9da9834c1bddd10a47bbf79366149ac152 100644 (file)
@@ -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);
        }