]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: listener: add relax_listener() function
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 15 Feb 2023 08:30:54 +0000 (09:30 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 Feb 2023 14:05:05 +0000 (15:05 +0100)
commitbcad7e6319a00ea0278fcad8125ac7116d6c55a5
tree9efc623fb7e6b3876670f3cea6f115b83ec001f8
parent4059e094db886dafd3766bb5b01da0252d13178f
MINOR: listener: add relax_listener() function

There is a need for a small difference between resuming and relaxing
a listener.

When resuming, we expect that the listener may completely resume, this includes
unpausing or rebinding if required.
Resuming a listener is a best-effort operation: no matter the current state,
try our best to bring the listener up to the LI_READY state.

There are some cases where we only want to "relax" listeners that were
previously restricted using limit_listener() or listener_full() functions.
Here we don't want to ressucitate listeners, we're simply interested in
cancelling out the previous restriction.

To this day, listener_resume() on a unbound listener is broken, that's why
the need for this wasn't felt yet.

But we're trying to restore historical listener_resume() behavior, so we better
prepare for this by introducing an explicit relax_listener() function that
only does what is expected in such cases.

This commit depends on:
 - "MINOR: listener/api: add lli hint to listener functions"
include/haproxy/listener.h
src/listener.c