mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-10-27 06:31:23 +01:00
BUG/MEDIUM: stconn: Properly forward kip to the opposite SE descriptor
By refactoring the HTX to remove the extra field, a bug was introduced in the stream-connector part. The <kip> (known input payload) value of a sedesc was moved to <kop> (knwon output payload) using the same sedesc. Of course, this is totally wrong. <kip> value of a sedesc must be forwarded to the opposite side. In addition, the operation is performed in sc_conn_send(). In this function, we manipulate the stream-connectors. So se_fwd_kip() function was changed to use the stream-connectors directely. Now, the function sc_ep_fwd_kip() is now called with the both stream-connectors to properly forward <kip> from on side to the opposite side. The bug is 3.3-specific. No backport needed.
This commit is contained in:
parent
54f0ab08b8
commit
4145a61101
@ -148,13 +148,14 @@ static inline struct sedesc *se_opposite(struct sedesc *se)
|
|||||||
return seo;
|
return seo;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void se_fwd_kip(struct sedesc *se)
|
/* stream connector version */
|
||||||
|
static inline void sc_ep_fwd_kip(struct stconn *sc_in, struct stconn *sc_out)
|
||||||
{
|
{
|
||||||
se->kop += se->kip;
|
BUG_ON(sc_in == NULL || sc_out == NULL);
|
||||||
se->kip = 0;
|
sc_out->sedesc->kop += sc_in->sedesc->kip;
|
||||||
|
sc_in->sedesc->kip = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* stream connector version */
|
|
||||||
static forceinline void sc_ep_zero(struct stconn *sc)
|
static forceinline void sc_ep_zero(struct stconn *sc)
|
||||||
{
|
{
|
||||||
se_fl_zero(sc->sedesc);
|
se_fl_zero(sc->sedesc);
|
||||||
|
|||||||
@ -1643,7 +1643,7 @@ int sc_conn_send(struct stconn *sc)
|
|||||||
if (!conn->mux)
|
if (!conn->mux)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
se_fwd_kip(sc->sedesc);
|
sc_ep_fwd_kip(sco, sc);
|
||||||
|
|
||||||
if (sc_ep_have_ff_data(sc)) {
|
if (sc_ep_have_ff_data(sc)) {
|
||||||
unsigned int send_flag = 0;
|
unsigned int send_flag = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user