mirror of
http://github.com/valkey-io/valkey
synced 2024-11-23 03:33:28 +00:00
Sentinel: make sure published addr/id buffer is large enough.
With ipv6 support we need more space, so we account for the IP address max size plus what we need for the Run ID, port, flags.
This commit is contained in:
parent
bd3c897e9f
commit
5c5ebb0b9a
@ -1839,7 +1839,7 @@ void sentinelPingInstance(sentinelRedisInstance *ri) {
|
||||
/* PUBLISH hello messages only to masters. */
|
||||
char ip[REDIS_IP_STR_LEN];
|
||||
if (anetSockName(ri->cc->c.fd,ip,sizeof(ip),NULL) != -1) {
|
||||
char myaddr[128];
|
||||
char myaddr[REDIS_IP_STR_LEN+128];
|
||||
|
||||
// FIXME: IPv6 will break this due to nested : characters -geoffgarside
|
||||
snprintf(myaddr,sizeof(myaddr),"%s:%d:%s:%d",
|
||||
|
Loading…
Reference in New Issue
Block a user