From: Ronnie Sahlberg Date: Mon, 30 Jul 2007 06:10:14 +0000 (+1000) Subject: after we have checked dest address that it is a public address X-Git-Tag: tevent-0.9.20~348^2~2445^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dd14afe6aa7a1a680eaa9a028a8d49937bcdffc7;p=thirdparty%2Fsamba.git after we have checked dest address that it is a public address update addr to the source address so the rpintout in the log matches the client that attached to samba (This used to be ctdb commit 72098b71c79469c86769ca82bbd484c81902d27c) --- diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c index 3ddd082c7e2..743d240c616 100644 --- a/ctdb/server/ctdb_takeover.c +++ b/ctdb/server/ctdb_takeover.c @@ -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 */