From dea79f3fe19a90c950328bfbfa50160ec89dbfd0 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 30 Apr 2024 08:36:55 +0200 Subject: [PATCH] MINOR: mux-h2: Set the SE abort reason when a RST_STREAM frame is received 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mux_h2.c b/src/mux_h2.c index fbf03a6e7..287979bf9 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -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;