mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-09 00:27:08 +02:00
BUG/MEDIUM: stick-tables: fix ref counter in table entry using multiple http tracksc.
Setting multiple http-request track-scX rules generates entries which never expires. If there was already an entry registered by a previous http rule 'stream_track_stkctr(&s->stkctr[rule->action], t, ts)' didn't register the new 'ts' into the stkctr. And function is left with no reference on 'ts' whereas refcount had been increased by the '_get_entry' The patch applies the same policy as the one showed on tcp track rules and if there is successive rules the track counter keep the first entry registered in the counter and nothing more is computed. After validation this should be backported in all versions.
This commit is contained in:
parent
c0ed91910a
commit
362d25e507
@ -1784,6 +1784,10 @@ static enum act_return http_action_track_sc(struct act_rule *rule, struct proxy
|
|||||||
opt = ((rule->from == ACT_F_HTTP_REQ) ? SMP_OPT_DIR_REQ : SMP_OPT_DIR_RES) | SMP_OPT_FINAL;
|
opt = ((rule->from == ACT_F_HTTP_REQ) ? SMP_OPT_DIR_REQ : SMP_OPT_DIR_RES) | SMP_OPT_FINAL;
|
||||||
|
|
||||||
t = rule->arg.trk_ctr.table.t;
|
t = rule->arg.trk_ctr.table.t;
|
||||||
|
|
||||||
|
if (stkctr_entry(&s->stkctr[rule->action]))
|
||||||
|
goto end;
|
||||||
|
|
||||||
key = stktable_fetch_key(t, s->be, sess, s, opt, rule->arg.trk_ctr.expr, NULL);
|
key = stktable_fetch_key(t, s->be, sess, s, opt, rule->arg.trk_ctr.expr, NULL);
|
||||||
|
|
||||||
if (!key)
|
if (!key)
|
||||||
|
Loading…
Reference in New Issue
Block a user