From: Willy Tarreau Date: Tue, 29 Nov 2022 17:01:28 +0000 (+0100) Subject: BUG/MINOR: peers: always update the stksess shard number on incoming updates X-Git-Tag: v2.7.0~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4ede46be4eb00bb9056606886878843679a6da3e;p=thirdparty%2Fhaproxy.git BUG/MINOR: peers: always update the stksess shard number on incoming updates If shards are in use, we must fill the shard number on incoming updates, otherwise some entries are assigned shard number zero, and may be broadcast everywhere once updated, instead of being sent only to the peers having the same shard number. This fixes commit 36d156564 ("MINOR: peers: Support for peer shards"). No backport is needed. --- diff --git a/src/peers.c b/src/peers.c index 5245bb7155..aa0ab9734e 100644 --- a/src/peers.c +++ b/src/peers.c @@ -1808,6 +1808,8 @@ static int peer_treat_updatemsg(struct appctx *appctx, struct peer *p, int updt, *msg_cur += keylen; } + newts->shard = stktable_get_key_shard(st->table, newts->key.key, keylen); + /* lookup for existing entry */ ts = stktable_set_entry(st->table, newts); if (ts != newts) {