s3:smbd: fix the fix for mapped IPv4 address handling in release_ip(). build_3.2.11_ctdb.60
authorMichael Adam <obnox@samba.org>
Fri, 8 May 2009 13:14:33 +0000 (15:14 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 8 May 2009 13:14:33 +0000 (15:14 +0200)
It was too late... Thanks Metze for noticing.

Michael

source/smbd/server.c

index 67f528c8610e6d668d85d8f807e6948dbb26fe0b..93ff24d8033118b390a373470e0e10967fb34bc1 100644 (file)
@@ -991,7 +991,7 @@ received when we should release a specific IP
 static void release_ip(const char *ip, void *priv)
 {
        char addr[INET6_ADDRSTRLEN];
-       char *p;
+       char *p = addr;
 
        client_socket_addr(get_client_fd(),addr,sizeof(addr));
 
@@ -999,7 +999,7 @@ static void release_ip(const char *ip, void *priv)
                p = addr + 7;
        }
 
-       if ((strcmp(p, ip) == 0) || (strcmp(addr, ip) == 0)) {
+       if ((strcmp(p, ip) == 0) || ((p != addr) && 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 -