mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-14 17:37:46 +00:00
BUG/MINOR: peers: always initialize the stksess shard value
We need to initialize the shard value in __stksess_init() because there is
not necessarily a key to make it happen later, resulting in an uninitialized
shard value appearing in the entry, typically when entries are learned from
peers. This fixes commit 36d156564
("MINOR: peers: Support for peer shards"),
no backport is needed.
Note however that it is not sufficient to completely fix the peers code, the
shard value remains zero because the setting of the key was open-coded in
the peers code and these parts were not identified when adding support for
shards.
This commit is contained in:
parent
f8c7709013
commit
e548a7af45
@ -199,6 +199,7 @@ static struct stksess *__stksess_init(struct stktable *t, struct stksess * ts)
|
||||
{
|
||||
memset((void *)ts - t->data_size, 0, t->data_size);
|
||||
ts->ref_cnt = 0;
|
||||
ts->shard = 0;
|
||||
ts->key.node.leaf_p = NULL;
|
||||
ts->exp.node.leaf_p = NULL;
|
||||
ts->upd.node.leaf_p = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user