[SCM] CTDB repository - branch master updated - ctdb-1.0.72-18-g0772190

Ronnie Sahlberg sahlberg at samba.org
Sun Mar 15 22:31:13 GMT 2009


The branch, master has been updated
       via  0772190203d501a39072f16948604742d7d59a5e (commit)
       via  d416c0e1e57a42f7ab52de903dbd8b5e111decfe (commit)
      from  76d655f9aa3ebd39e7a40d0bbd85e40d08f3e90b (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 0772190203d501a39072f16948604742d7d59a5e
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon Mar 16 09:27:56 2009 +1100

    new version 1.0.74

commit d416c0e1e57a42f7ab52de903dbd8b5e111decfe
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon Mar 16 09:21:24 2009 +1100

    From C Cowan, AIX needs to set sockaddr.sa_len to a consistent value for
    the address type used or the connect() call will fail.

-----------------------------------------------------------------------

Summary of changes:
 packaging/RPM/ctdb.spec |    7 ++++++-
 tcp/tcp_connect.c       |   12 +++++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/packaging/RPM/ctdb.spec b/packaging/RPM/ctdb.spec
index 66ca330..1d83627 100644
--- a/packaging/RPM/ctdb.spec
+++ b/packaging/RPM/ctdb.spec
@@ -4,7 +4,7 @@ Summary: Clustered TDB
 Vendor: Samba Team
 Packager: Samba Team <samba at samba.org>
 Name: ctdb
-Version: 1.0.73
+Version: 1.0.74
 Release: 1
 Epoch: 0
 License: GNU GPL version 3
@@ -128,6 +128,11 @@ fi
 %{_includedir}/ctdb_private.h
 
 %changelog
+* Mon Mar 16 2009 : Version 1.0.74
+ - Fixes to AIX from C Cowan.
+ - Fixes to ctdb_diagnostics so we collect correct GPFS data
+ - Fixes to the net conf list command in ctdb_diagnostics
+ - Check the static-routes file IFF it exists in ctdb_diagnostics
 * Wed Mar 4 2009 : Version 1.0.73
  - Add possibility to disable the check of shares for NFS and Samba
  - From Sumit Bose, fix dependencies so make -j works
diff --git a/tcp/tcp_connect.c b/tcp/tcp_connect.c
index 8efb597..ac443d1 100644
--- a/tcp/tcp_connect.c
+++ b/tcp/tcp_connect.c
@@ -129,6 +129,7 @@ void ctdb_tcp_node_connect(struct event_context *ev, struct timed_event *te,
 	struct ctdb_context *ctdb = node->ctdb;
         ctdb_sock_addr sock_in;
 	int sockin_size;
+	int sockout_size;
         ctdb_sock_addr sock_out;
 
 	ctdb_tcp_stop_connection(node);
@@ -167,12 +168,20 @@ void ctdb_tcp_node_connect(struct event_context *ev, struct timed_event *te,
 	if (ctdb_tcp_get_address(ctdb, ctdb->address.address, &sock_in) != 0) {
 		return;
 	}
+
+	/* AIX libs check to see if the socket address and length
+	   arguments are consistent with each other on calls like
+	   connect().   Can not get by with just sizeof(sock_in),
+	   need sizeof(sock_in.ip).
+	*/
 	switch (sock_in.sa.sa_family) {
 	case AF_INET:
 		sockin_size = sizeof(sock_in.ip);
+		sockout_size = sizeof(sock_out.ip);
 		break;
 	case AF_INET6:
 		sockin_size = sizeof(sock_in.ip6);
+		sockout_size = sizeof(sock_out.ip6);
 		break;
 	default:
 		DEBUG(DEBUG_ERR, (__location__ " unknown family %u\n",
@@ -181,10 +190,11 @@ void ctdb_tcp_node_connect(struct event_context *ev, struct timed_event *te,
 	}
 #ifdef HAVE_SOCK_SIN_LEN
 	sock_in.ip.sin_len = sockin_size;
+	sock_out.ip.sin_len = sockout_size;
 #endif
 	bind(tnode->fd, (struct sockaddr *)&sock_in, sockin_size);
 
-	if (connect(tnode->fd, (struct sockaddr *)&sock_out, sizeof(sock_out)) != 0 &&
+	if (connect(tnode->fd, (struct sockaddr *)&sock_out, sockout_size) != 0 &&
 	    errno != EINPROGRESS) {
 		ctdb_tcp_stop_connection(node);
 		tnode->connect_te = event_add_timed(ctdb->ev, tnode, 


-- 
CTDB repository


More information about the samba-cvs mailing list