]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: listener: fix resume_listener() resume return value handling
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 7 Feb 2023 12:26:14 +0000 (13:26 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 Feb 2023 14:05:05 +0000 (15:05 +0100)
commit3bb2a38f01990919b7285ce94e0ae762722dafba
tree457cec5dc999e649173ed9d6810686ab21c6eb6c
parent7a15fa58b1087db4af60d4beaca0a11bbc8c0778
BUG/MINOR: listener: fix resume_listener() resume return value handling

In resume_listener(), proto->resume() errors were not properly handled:
the function kept flowing down as if no errors were detected.

Instead, we're performing an early return when such errors are detected to
prevent undefined behaviors.

This could be backported up to 2.4.

--
Backport notes:

This commit depends on:
 - "MINOR: listener: make sure we don't pause/resume bypassed listeners"

-> 2.4 ... 2.7:

Replace this:

    |        if (l->bind_conf->maxconn && l->nbconn >= l->bind_conf->maxconn) {
    |                l->rx.proto->disable(l);

By this:

    |        if (l->maxconn && l->nbconn >= l->maxconn) {
    |                l->rx.proto->disable(l);
src/listener.c