diff options
author | Geoff Garside <geoff@geoffgarside.co.uk> | 2011-06-18 19:43:47 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2013-07-08 15:58:14 +0200 |
commit | ca78446c55a09e9e871d55f8421da35016b7bda1 (patch) | |
tree | d02ebbbe451cf62bda79f227ca66eddd5c00d770 /src/networking.c | |
parent | 96b02dc0556417800b566ae105d55ee5b23b9a95 (diff) | |
download | redis-ca78446c55a09e9e871d55f8421da35016b7bda1.tar.gz |
Mark places that might want changing for IPv6.
Any places which I feel might want to be updated to work differently
with IPv6 have been marked with a comment starting "IPV6:".
Currently the only comments address places where an IP address is
combined with a port using the standard : separated form. These may want
to be changed when printing IPv6 addresses to wrap the address in []
such as
[2001:db8::c0:ffee]:6379
instead of
2001:db8::c0:ffee:6379
as the latter format is a technically valid IPv6 address and it is hard
to distinguish the IPv6 address component from the port unless you know
the port is supposed to be there.
Diffstat (limited to 'src/networking.c')
-rw-r--r-- | src/networking.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/networking.c b/src/networking.c index e58db607a..b220055f1 100644 --- a/src/networking.c +++ b/src/networking.c @@ -1216,6 +1216,7 @@ void clientCommand(redisClient *c) { client = listNodeValue(ln); if (anetPeerToString(client->fd,ip,sizeof(ip),&port) == -1) continue; + /* IPV6: might want to wrap a v6 address in [] */ snprintf(addr,sizeof(addr),"%s:%d",ip,port); if (strcmp(addr,c->argv[2]->ptr) == 0) { addReply(c,shared.ok); |