From 693b640510cb8e09b69e42205ec87a104fa79b57 Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Fri, 17 Jun 2011 20:37:45 +0100 Subject: [PATCH] Use inet_pton(3) in clusterCommand. Replace inet_aton(3) call with the more future proof inet_pton(3) function which is capable of handling additional address families. --- src/cluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cluster.c b/src/cluster.c index f59b4561..7531ab7c 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -2070,7 +2070,7 @@ void clusterCommand(redisClient *c) { long port; /* Perform sanity checks on IP/port */ - if (inet_aton(c->argv[2]->ptr,&sa.sin_addr) == 0) { + if (inet_pton(AF_INET,c->argv[0]->ptr,&(sa.sin_addr)) == 0) { addReplyError(c,"Invalid IP address in MEET"); return; }