From: Michael Adam Date: Fri, 8 May 2009 13:13:21 +0000 (+0200) Subject: s3:smbd: fix the fix for mapped IPv4 address handling in release_ip(). X-Git-Tag: tdb-1.1.5~665 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d6e4c7e950592112d09f7d98393c41e8097bba8;p=thirdparty%2Fsamba.git s3:smbd: fix the fix for mapped IPv4 address handling in release_ip(). It was too late... Thanks Metze for noticing. Michael --- diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 0f3e560611c..487358d701d 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -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 -