]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: channel: don't allow to overwrite the reserve until connected
authorWilly Tarreau <w@1wt.eu>
Wed, 20 Apr 2016 18:09:22 +0000 (20:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 21 Apr 2016 13:31:22 +0000 (15:31 +0200)
commit4b46a3e8cce58db03ee90718e39fb3bffb2b7273
tree008f6389fba102ced10042e618ec727d4c9cc56e
parentc3fe5330be4c2d15ea50ae3a2d01e9287461d13c
BUG/MEDIUM: channel: don't allow to overwrite the reserve until connected

Commit 9c06ee4 ("BUG/MEDIUM: channel: don't schedule data in transit for
leaving until connected") took care of an issue involving POST in conjunction
with http-send-name-header, where we absolutely never want to touch the
reserve until we're sure not to touch the buffer contents anymore, which
is indicated by the output stream-interface being connected.

But channel_may_recv() was not equipped with such a test, so in some
situations it might decide that it is possible to poll for reads, and
later channel_recv_limit() will decide it's not possible to read,
causing a loop. So we must add a similar test there.

Since the fix above was backported to 1.6 and 1.5, this fix must as well.
include/proto/channel.h