]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h2: make sure we check the conn_stream in early data
authorWilly Tarreau <w@1wt.eu>
Wed, 19 Dec 2018 17:33:16 +0000 (18:33 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 19 Dec 2018 17:33:16 +0000 (18:33 +0100)
When dealing with early data we scan the list of stream to notify them.
We're not supposed to have h2s->cs == NULL here but it doesn't cost much
to make the scan more robust and verify it before notifying.

No backport is needed.

src/mux_h2.c

index 4ca71222c05b5f4f06ef4a9e3b741d75d60a90a9..faa5d0bcc2e7a6f5efdab6c61dd50ecd36beb993 100644 (file)
@@ -2665,7 +2665,7 @@ static int h2_process(struct h2c *h2c)
 
                while (node) {
                        h2s = container_of(node, struct h2s, by_id);
-                       if (h2s->cs->flags & CS_FL_WAIT_FOR_HS)
+                       if (h2s->cs && h2s->cs->flags & CS_FL_WAIT_FOR_HS)
                                h2s_notify_recv(h2s);
                        node = eb32_next(node);
                }