From aa73c875d7618cdd9c009e3f76fce3861da4e6ec Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Tue, 9 Sep 2025 17:32:18 +0200 Subject: [PATCH] BUG/MEDIUM: h1: Allow reception if we have early data In h1_recv_allowed(), do not forbid the reception if we are yet to complete the connection, if we have received early data on it. That way, we can deal with them right away, instead of waiting for the handshake to be done. This should be backported up to 2.8. (cherry picked from commit aa25ddb773e484793a5c245bfa3f98b917c215be) Signed-off-by: Christopher Faulet (cherry picked from commit 1e4b80a8be585024e1993c6fdd460edcbf239d12) Signed-off-by: Christopher Faulet (cherry picked from commit 00beb362dde7fad080a3e0e768738bfef7f46c39) Signed-off-by: Christopher Faulet --- src/mux_h1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mux_h1.c b/src/mux_h1.c index 308b467..9b0dfe2 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -480,7 +480,8 @@ static inline int h1_recv_allowed(const struct h1c *h1c) return 0; } - if (h1c->conn->flags & (CO_FL_WAIT_L4_CONN|CO_FL_WAIT_L6_CONN)) { + if (h1c->conn->flags & (CO_FL_WAIT_L4_CONN|CO_FL_WAIT_L6_CONN) && + !(h1c->conn->flags & CO_FL_EARLY_DATA)) { TRACE_DEVEL("recv not allowed because of (waitl4|waitl6) on connection", H1_EV_H1C_RECV|H1_EV_H1C_BLK, h1c->conn); return 0; } -- 1.7.10.4