On Wed, Aug 22, 2018 at 04:32:49AM +0200, Willy Tarreau wrote:
> Excellent, I think I found it :
>
> trash.data = recv(conn->handle.fd, trash.area, trash.size,
> MSG_PEEK);
> if (trash.data < 0) {
> if (errno == EINTR)
> continue;
> if (errno == EAGAIN) {
> fd_cant_recv(conn->handle.fd);
> return 0;
> }
> ...
>
> trash.data is a size_t now so it cannot be negative. Thus it's believed
> that recv() never fails. This it's clearly related to the buffer changes.
> I'm seeing a few other such places that require using an intermediate
> variable for the test. After all it's not that bad because we've inherited
> such assignments from a good decade, and it's time to clean this up as well.
So I've now addressed all those I could find (quite a bunch in fact).
I think everything's OK now regarding this. I haven't checked for the
capture yet but since it was already broken in 1.6, it can still wait
a bit ;-)
Thanks for your reports!
Willy