static void release_ip(const char *ip, void *priv)
{
char addr[INET6_ADDRSTRLEN];
+ char *p;
- if (strcmp(client_socket_addr(get_client_fd(),addr,sizeof(addr)), ip) == 0) {
+ client_socket_addr(get_client_fd(),addr,sizeof(addr));
+
+ if (strncmp("::ffff:", addr, 7) == 0) {
+ p = addr + 7;
+ }
+
+ if ((strcmp(p, ip) == 0) || (strcmp(addr, ip) == 0)) {
/* we can't afford to do a clean exit - that involves
database writes, which would potentially mean we
are still running after the failover has finished -