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

Michael

source3/smbd/process.c

index 0f3e560611cc9676897214c51462d4e77a8add29..487358d701dc492f18355d324fa343d7f27c59ee 100644 (file)
@@ -1887,7 +1887,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));
 
@@ -1895,7 +1895,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 -