mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
[BUG] buffers: remove BF_MAY_CONNECT and fix forwarding issue
It wasn't really wise to separate BF_MAY_CONNECT and BF_MAY_FORWARD, as it caused trouble in TCP mode because the connection was allowed but not the forwarding. Remove BF_MAY_CONNECT.
This commit is contained in:
parent
9a8c5de375
commit
d9f483646d
@ -53,10 +53,9 @@
|
|||||||
#define BF_STREAMER 4096
|
#define BF_STREAMER 4096
|
||||||
#define BF_STREAMER_FAST 8192
|
#define BF_STREAMER_FAST 8192
|
||||||
|
|
||||||
#define BF_MAY_CONNECT 16384 /* consumer side is allowed to forward the connection */
|
#define BF_MAY_FORWARD 16384 /* consumer side is allowed to forward the data */
|
||||||
#define BF_MAY_FORWARD 32768 /* consumer side is allowed to forward the data */
|
#define BF_READ_TIMEOUT 32768 /* timeout while waiting for producer */
|
||||||
#define BF_READ_TIMEOUT 65536 /* timeout while waiting for producer */
|
#define BF_WRITE_TIMEOUT 65536 /* timeout while waiting for consumer */
|
||||||
#define BF_WRITE_TIMEOUT 131072 /* timeout while waiting for consumer */
|
|
||||||
|
|
||||||
/* describes a chunk of string */
|
/* describes a chunk of string */
|
||||||
struct chunk {
|
struct chunk {
|
||||||
|
@ -338,7 +338,7 @@ int event_accept(int fd) {
|
|||||||
s->req->rlim -= MAXREWRITE;
|
s->req->rlim -= MAXREWRITE;
|
||||||
|
|
||||||
if (!(s->analysis & AN_REQ_ANY))
|
if (!(s->analysis & AN_REQ_ANY))
|
||||||
s->req->flags |= BF_MAY_CONNECT; /* don't wait to establish connection */
|
s->req->flags |= BF_MAY_FORWARD; /* don't wait to establish connection */
|
||||||
|
|
||||||
s->req->rto = s->fe->timeout.client;
|
s->req->rto = s->fe->timeout.client;
|
||||||
s->req->wto = s->be->timeout.server;
|
s->req->wto = s->be->timeout.server;
|
||||||
|
@ -2992,8 +2992,8 @@ int process_cli(struct session *t)
|
|||||||
req->l, rep->l);
|
req->l, rep->l);
|
||||||
|
|
||||||
/* if no analysis remains, it's time to forward the connection */
|
/* if no analysis remains, it's time to forward the connection */
|
||||||
if (!(t->analysis & AN_REQ_ANY) && !(req->flags & (BF_MAY_CONNECT|BF_MAY_FORWARD)))
|
if (!(t->analysis & AN_REQ_ANY) && !(req->flags & BF_MAY_FORWARD))
|
||||||
req->flags |= BF_MAY_CONNECT | BF_MAY_FORWARD;
|
req->flags |= BF_MAY_FORWARD;
|
||||||
|
|
||||||
/* FIXME: we still have to check for CL_STSHUTR because client_retnclose
|
/* FIXME: we still have to check for CL_STSHUTR because client_retnclose
|
||||||
* still set this state (and will do until unix sockets are converted).
|
* still set this state (and will do until unix sockets are converted).
|
||||||
@ -3228,7 +3228,7 @@ int process_srv(struct session *t)
|
|||||||
trace_term(t, TT_HTTP_SRV_1);
|
trace_term(t, TT_HTTP_SRV_1);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else if (req->flags & BF_MAY_CONNECT) {
|
else if (req->flags & BF_MAY_FORWARD) {
|
||||||
/* the client allows the server to connect */
|
/* the client allows the server to connect */
|
||||||
if (txn->flags & TX_CLTARPIT) {
|
if (txn->flags & TX_CLTARPIT) {
|
||||||
/* This connection is being tarpitted. The CLIENT side has
|
/* This connection is being tarpitted. The CLIENT side has
|
||||||
|
Loading…
x
Reference in New Issue
Block a user