vipshop / hiredis-vip

Support redis cluster. Maintained and used at vipshop.
BSD 3-Clause "New" or "Revised" License
322 stars 173 forks source link

Correct way to connect with IPv6 cluster #123

Open LazyHippogriff opened 5 years ago

LazyHippogriff commented 5 years ago

Given below is the definition of ip_port_separator as given in hircluster.c

define IP_PORT_SEPARATOR ":"

How should I connect with my cluster which has got only IPv6? IPv6 has already got ':' in the IP address. Should I change the macro?

bjosv commented 3 years ago

The separator is searched from the beginning of the address string, and one possibility to handle IPv6 is to search from the end of the address string instead, see commit. In this fork, we have added IPv6 support. We have also fixed memory leaks, allocation failure handling and added features like TLS support. Feel free to switch to this fork.