From 4ede46be4eb00bb9056606886878843679a6da3e Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 29 Nov 2022 18:01:28 +0100 Subject: [PATCH] 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. --- src/peers.c | 2 ++ 1 file changed, 2 insertions(+) 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) { -- 2.47.3