]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: ssl/crt-list: Rework 'add ssl crt-list' to handle full buffer cases
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 1 Jun 2022 14:31:09 +0000 (16:31 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 1 Jun 2022 15:20:57 +0000 (17:20 +0200)
commitc642d7c131fe0cc29a5cd1feedef05e27a390403
treed65e129768764e576ec9a7e3b997198ea222fe3b
parente9c3bd13957470d0daf31ebc31171c088e69f81e
BUG/MEDIUM: ssl/crt-list: Rework 'add ssl crt-list' to handle full buffer cases

'add ssl crt-list' command is also concerned. This patch is similar to the
previous ones. Full buffer cases when we try to push the reply are not
properly handled. To fix the issue, the functions responsible to add a
crt-list entry were reworked.

First, the error message is now part of the service context. This way, if we
cannot push the error message in the reponse buffer, we may retry later. To
do so, a dedicated state was created (ADDCRT_ST_ERROR,). Then, the success
message is also handled in a dedicated state (ADDCRT_ST_SUCCESS). This way
we are able to retry to push it if necessary. Finally, the dot displayed for
each new instance is now immediatly pushed in the response buffer, and
before the update. This way, we are able to retry too if necessary.

This patch should fix the issue #1724. It must be backported as far as
2.2. But a massive refactoring was performed in 2.6. So, for the 2.5 and
below, the patch will have to be adapted.
src/ssl_crtlist.c