From: Christopher Faulet Date: Wed, 12 Apr 2023 12:20:36 +0000 (+0200) Subject: BUG/MINOR: stream: Fix test on SE_FL_ERROR on the wrong entity X-Git-Tag: v2.8-dev8~163 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=925279ccf241200d219b84e3e00124d677925360;p=thirdparty%2Fhaproxy.git BUG/MINOR: stream: Fix test on SE_FL_ERROR on the wrong entity There is a bug at begining of process_stream(). The SE_FL_ERROR flag is tested against backend stream-connector's flags instead of its SE descriptor's flags. It is an old typo, introduced when the stream-interfaces were replaced by the conn-streams. This patch must be backported as far as 2.6. --- diff --git a/src/stream.c b/src/stream.c index 803dbe8309..cbcdfefb49 100644 --- a/src/stream.c +++ b/src/stream.c @@ -1782,7 +1782,7 @@ struct task *process_stream(struct task *t, void *context, unsigned int state) if (!((scf->flags | scb->flags) & (SC_FL_SHUTR|SC_FL_SHUTW)) && !((req->flags | res->flags) & (CF_READ_EVENT|CF_READ_TIMEOUT|CF_WRITE_EVENT|CF_WRITE_TIMEOUT)) && !(s->flags & SF_CONN_EXP) && - !((sc_ep_get(scf) | scb->flags) & SE_FL_ERROR) && + !((sc_ep_get(scf) | sc_ep_get(scb)) & SE_FL_ERROR) && ((s->pending_events & TASK_WOKEN_ANY) == TASK_WOKEN_TIMER)) { scf->flags &= ~SC_FL_DONT_WAKE; scb->flags &= ~SC_FL_DONT_WAKE;