]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MAJOR: stream: in stream_free(), close the front endpoint and not the origin
authorWilly Tarreau <w@1wt.eu>
Thu, 17 Aug 2017 13:54:46 +0000 (15:54 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 17 Aug 2017 16:26:56 +0000 (18:26 +0200)
stream_free() used to close the front connection by using s->sess->origin,
instead of using s->si[0].end. This is very visible in HTTP/2 where the
front connection is abusively closed and causes all sort of issues including
crashes caused by double closes due to the same origin being referenced many
times.

It's also suspected that it may have caused some of the early issues met
during the Lua development.

It's uncertain whether stable branches are affected. It might be worth
backporting it once it has been confirmed not to create new impacts.

src/stream.c

index 6b7be1eecf99ee05344c3d529e378b037286fdb9..3a88fd47c54bb7e6c61bc95da2eebb56ea4b5ce9 100644 (file)
@@ -262,7 +262,7 @@ static void stream_free(struct stream *s)
        struct session *sess = strm_sess(s);
        struct proxy *fe = sess->fe;
        struct bref *bref, *back;
-       struct connection *cli_conn = objt_conn(sess->origin);
+       struct connection *cli_conn = objt_conn(s->si[0].end);
        int i;
 
        if (s->pend_pos)