after we have checked dest address that it is a public address
authorRonnie Sahlberg <sahlberg@ronnie>
Mon, 30 Jul 2007 06:10:14 +0000 (16:10 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Mon, 30 Jul 2007 06:10:14 +0000 (16:10 +1000)
update addr to the source address so the rpintout in the log matches
the client that attached to samba

server/ctdb_takeover.c

index 3ddd082c7e2cb9a0f3d1ef9f2d8f290a45439dee..743d240c616eab9c692000751b6eb5c7530bd531 100644 (file)
@@ -643,10 +643,12 @@ int32_t ctdb_control_tcp_client(struct ctdb_context *ctdb, uint32_t client_id,
 
        takeover_vnn = find_public_ip_vnn(ctdb, addr);
        if (takeover_vnn == -1) {
-               DEBUG(3,("Could not add client IP %s. It is not a public address.\n", addr)); 
+               DEBUG(3,("Could not add client IP %s. This is not a public address.\n", addr)); 
                return -1;
        }
 
+       addr = inet_ntoa(p->src.sin_addr);
+
        tcp->connection.saddr = p->src;
        tcp->connection.daddr = p->dest;
 
@@ -718,7 +720,6 @@ int32_t ctdb_control_tcp_add(struct ctdb_context *ctdb, TDB_DATA indata)
        struct ctdb_tcp_array *tcparray;
        struct ctdb_tcp_connection tcp;
 
-
        tcparray = ctdb->nodes[p->vnn]->tcp_array;
 
        /* If this is the first tickle */