diff options
author | Binbin <binloveplay1314@qq.com> | 2022-09-19 18:59:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-19 13:59:36 +0300 |
commit | c2b0c13d5c0fab49131f6f5e844f80bfa43f6219 (patch) | |
tree | a408df7703fedf17e17cfaa2f819f364ef3ff03d /src/redis-cli.c | |
parent | 13d25dd95eec5e21925ef474b5d43f2acb23e54e (diff) | |
download | redis-c2b0c13d5c0fab49131f6f5e844f80bfa43f6219.tar.gz |
Fix Invalid node address specified in redis-cli --cluster create/add-node (#11151)
This bug was introduced in #10344 (7.0.3), and it breaks the
redis-cli --cluster create usage in #10436 (7.0 RC3).
At the same time, the cluster-port support introduced in #10344
cannot use the DNS lookup brought by #10436.
Diffstat (limited to 'src/redis-cli.c')
-rw-r--r-- | src/redis-cli.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/redis-cli.c b/src/redis-cli.c index 131e79a78..0a22598d2 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -6341,10 +6341,10 @@ assign_replicas: * So if (bus_port == 0) or (bus_port == port + CLUSTER_MANAGER_PORT_INCR), * we just call CLUSTER MEET with 2 arguments, using the old form. */ reply = CLUSTER_MANAGER_COMMAND(node, "cluster meet %s %d", - first->ip, first->port); + first_ip, first->port); } else { reply = CLUSTER_MANAGER_COMMAND(node, "cluster meet %s %d %d", - first->ip, first->port, first->bus_port); + first_ip, first->port, first->bus_port); } int is_err = 0; if (reply != NULL) { @@ -6535,7 +6535,7 @@ static int clusterManagerCommandAddNode(int argc, char **argv) { first_ip, first->port); } else { reply = CLUSTER_MANAGER_COMMAND(new_node, "CLUSTER MEET %s %d %d", - first->ip, first->port, first->bus_port); + first_ip, first->port, first->bus_port); } if (!(success = clusterManagerCheckRedisReply(new_node, reply, NULL))) |