]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-h2: Set the SE abort reason when a RST_STREAM frame is received
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 30 Apr 2024 06:36:55 +0000 (08:36 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 6 May 2024 20:00:00 +0000 (22:00 +0200)
When RST_STREAM frame is received, the error code is now saved in the SE
abort reason. To do so, we use the H2 source (SE_ABRT_SRC_MUX_H2). For now,
this code is only set but not used on the opposite side.

src/mux_h2.c

index fbf03a6e736644bfe99446f7de0c6b65aae35d32..287979bf92ce26aaadb46e6f5eb78384418a136c 100644 (file)
@@ -2812,6 +2812,10 @@ static int h2c_handle_rst_stream(struct h2c *h2c, struct h2s *h2s)
 
        if (h2s_sc(h2s)) {
                se_fl_set_error(h2s->sd);
+               if (!h2s->sd->abort_info.info) {
+                       h2s->sd->abort_info.info = (SE_ABRT_SRC_MUX_H2 << SE_ABRT_SRC_SHIFT);
+                       h2s->sd->abort_info.code = h2s->errcode;
+               }
                h2s_alert(h2s);
        }
 
@@ -4888,7 +4892,7 @@ static void h2_detach(struct sedesc *sd)
 }
 
 /* Performs a synchronous or asynchronous shutr(). */
-static void h2_do_shutr(struct h2s *h2s)
+static void h2_do_shutr(struct h2s *h2s, struct se_abort_info *reason)
 {
        struct h2c *h2c = h2s->h2c;