mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
[BUG] stick_table: the fix for the memory leak caused a regression
(cherry picked from commit 61ba936e6858dfcf9964d25870726621d8188fb9) [ note: the bug was finally not present in 1.5-dev but at least we have to reset store_count to be compatible with 1.4 ] Commit d6e9e3b5e320b957e6c491bd92d91afad30ba638 caused recently created entries to be removed as soon as they were created, breaking stickiness. It is not clear whether a use-after-free was possible or not in this case. This bug was reported by Ben Congleton and narrowed down by Herv Commowick, both of whom also tested the fix. Thanks to them !
This commit is contained in:
parent
acf9577350
commit
2a164ee549
@ -1068,6 +1068,7 @@ int process_store_rules(struct session *s, struct buffer *rep, int an_bit)
|
|||||||
ptr = stktable_data_ptr(s->store[i].table, ts, STKTABLE_DT_SERVER_ID);
|
ptr = stktable_data_ptr(s->store[i].table, ts, STKTABLE_DT_SERVER_ID);
|
||||||
stktable_data_cast(ptr, server_id) = s->srv->puid;
|
stktable_data_cast(ptr, server_id) = s->srv->puid;
|
||||||
}
|
}
|
||||||
|
s->store_count = 0; /* everything is stored */
|
||||||
|
|
||||||
rep->analysers &= ~an_bit;
|
rep->analysers &= ~an_bit;
|
||||||
rep->analyse_exp = TICK_ETERNITY;
|
rep->analyse_exp = TICK_ETERNITY;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user