mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-13 19:00:25 -04:00
BUG/MINOR: mux-h1: H2 preface rejection doesn't update stick-table glitches
commit72fd357814("MEDIUM: mux-h1: Return an error on h2 upgrade attempts if not allowed") added an h1_report_glitch() call on the new 405 path but exits via "goto no_parsing", which skips the session_add_glitch_ctr() call at the end of the parse block. As a result fc_glitches increments correctly but the per-session stick counters never see it, breaking sc_glitch_cnt-based rate limiting of the H2-preface-over-H1 abuse pattern. No backport needed beyond the branches that took72fd357814. [cf: Patch was edited to move the goto label instead of duplicating the call to session_add_glitch_ctr]
This commit is contained in:
parent
85a833feba
commit
8d771110e0
1 changed files with 1 additions and 1 deletions
|
|
@ -4257,11 +4257,11 @@ static int h1_process(struct h1c * h1c)
|
|||
h1c->conn->xprt->subscribe(h1c->conn, h1c->conn->xprt_ctx, SUB_RETRY_RECV, &h1c->wait_event);
|
||||
}
|
||||
}
|
||||
no_parsing:
|
||||
if (h1c->glitches != prev_glitches && !(h1c->flags & H1C_F_IS_BACK))
|
||||
session_add_glitch_ctr(sess, h1c->glitches - prev_glitches);
|
||||
}
|
||||
|
||||
no_parsing:
|
||||
h1_send(h1c);
|
||||
|
||||
/* H1 connection must be released ASAP if:
|
||||
|
|
|
|||
Loading…
Reference in a new issue