summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-05-08 01:11:43 +0200
committerMichael Adam <obnox@samba.org>2009-05-08 01:18:58 +0200
commite86a534fa707b44baec87060745dd8a557622721 (patch)
tree4afc3ded270dbed4ceb19b9d174f1d2177a32da5 /source3/smbd
parent53713be2cbc1156769b8b82d3df9da02459232ce (diff)
downloadsamba-e86a534fa707b44baec87060745dd8a557622721.tar.gz
samba-e86a534fa707b44baec87060745dd8a557622721.tar.bz2
samba-e86a534fa707b44baec87060745dd8a557622721.zip
s3: make release_ip() call (ctdb) cope with IPv4 mapped addresses
Michael
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/process.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 7605ad70b5..0f3e560611 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1887,8 +1887,15 @@ received when we should release a specific IP
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 -