Skip to content

Commit c2b0c13

Browse files
authored
Fix Invalid node address specified in redis-cli --cluster create/add-node (redis#11151)
This bug was introduced in redis#10344 (7.0.3), and it breaks the redis-cli --cluster create usage in redis#10436 (7.0 RC3). At the same time, the cluster-port support introduced in redis#10344 cannot use the DNS lookup brought by redis#10436.
1 parent 13d25dd commit c2b0c13

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/redis-cli.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6341,10 +6341,10 @@ static int clusterManagerCommandCreate(int argc, char **argv) {
63416341
* So if (bus_port == 0) or (bus_port == port + CLUSTER_MANAGER_PORT_INCR),
63426342
* we just call CLUSTER MEET with 2 arguments, using the old form. */
63436343
reply = CLUSTER_MANAGER_COMMAND(node, "cluster meet %s %d",
6344-
first->ip, first->port);
6344+
first_ip, first->port);
63456345
} else {
63466346
reply = CLUSTER_MANAGER_COMMAND(node, "cluster meet %s %d %d",
6347-
first->ip, first->port, first->bus_port);
6347+
first_ip, first->port, first->bus_port);
63486348
}
63496349
int is_err = 0;
63506350
if (reply != NULL) {
@@ -6535,7 +6535,7 @@ static int clusterManagerCommandAddNode(int argc, char **argv) {
65356535
first_ip, first->port);
65366536
} else {
65376537
reply = CLUSTER_MANAGER_COMMAND(new_node, "CLUSTER MEET %s %d %d",
6538-
first->ip, first->port, first->bus_port);
6538+
first_ip, first->port, first->bus_port);
65396539
}
65406540

65416541
if (!(success = clusterManagerCheckRedisReply(new_node, reply, NULL)))

0 commit comments

Comments
 (0)