From 02700f11cdb36098854fb30357b773e6d585dabb Mon Sep 17 00:00:00 2001 From: I <27162227+impimp@users.noreply.github.com> Date: Mon, 2 Feb 2026 12:02:44 +0100 Subject: [PATCH] RDB Channel connections mistakenly discovered by Sentinel (#14728) (#14729) Fix RDB Channel connections mistakenly discovered by Sentinel During fullsync, if the main replication connection is interrupted, but the rdbchannel connection is still active, it will be visible in the "info replication" output. Currently, the rdbchannel connection does not send `REPLCONF ip-address`, and in a meshed scenario, when the source IP addresses of both connections differ, Sentinel will treat them as separate replicas. This commit adds `REPLCONF ip-address` to rdbchannel replica handshake if `server.slave_announce_ip` is enabled. fixes: https://github.com/redis/redis/issues/14728 Co-authored-by: Ozan Tezcan --- src/replication.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/replication.c b/src/replication.c index 309d6c4f7..e400eb67d 100644 --- a/src/replication.c +++ b/src/replication.c @@ -3724,7 +3724,11 @@ static int rdbChannelSendHandshake(connection *conn, sds *err) { *err = sendCommand(conn, "REPLCONF", "capa", "eof", "rdb-only", "1", "rdb-channel", "1", "main-ch-client-id", cid, - "listening-port", buf, NULL); + "listening-port", buf, + server.slave_announce_ip ? "ip-address" : NULL, + server.slave_announce_ip ? server.slave_announce_ip : NULL, + NULL); + if (*err) { serverLog(LL_WARNING, "Error sending REPLCONF command to master in rdb channel handshake: %s", *err); return C_ERR;