From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3506 invoked by alias); 6 Apr 2009 10:20:38 -0000 Received: (qmail 3455 invoked by alias); 6 Apr 2009 10:20:38 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_66,SPF_HELO_PASS X-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_66,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bastion.fedora.phx.redhat.com Subject: cluster: master - cman: Look for IPv6 names that match cluster.conf too. To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 458a162d9d2ac626f7400f16fc782856dd97a31f X-Git-Newrev: f3e8b38b29c665b5b4b22e4e8aa95218df914d08 From: Christine Caulfield Message-Id: <20090406102010.3FA0C12036D@lists.fedorahosted.org> Date: Mon, 06 Apr 2009 10:20:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q2/txt/msg00029.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=f3e8b38b29c665b5b4b22e4e8aa95218df914d08 Commit: f3e8b38b29c665b5b4b22e4e8aa95218df914d08 Parent: 458a162d9d2ac626f7400f16fc782856dd97a31f Author: Christine Caulfield AuthorDate: Mon Apr 6 11:15:47 2009 +0100 Committer: Christine Caulfield CommitterDate: Mon Apr 6 11:19:44 2009 +0100 cman: Look for IPv6 names that match cluster.conf too. cman now looks at addresses that are bound to IPv6 addresses when searching the interface list rather than just IPv4 ones. Signed-off-by: Christine Caulfield --- cman/config/cman-preconfig.c | 13 +++++++++++-- config/plugins/ldap/configldap.c | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/cman/config/cman-preconfig.c b/cman/config/cman-preconfig.c index 93e0c42..11860dc 100644 --- a/cman/config/cman-preconfig.c +++ b/cman/config/cman-preconfig.c @@ -418,13 +418,22 @@ static int verify_nodename(struct objdb_iface_ver0 *objdb, char *nodename) return -1; for (ifa = ifa_list; ifa; ifa = ifa->ifa_next) { + socklen_t salen; + /* Restore this */ strcpy(nodename2, nodename); sa = ifa->ifa_addr; - if (!sa || sa->sa_family != AF_INET) + if (!sa) + continue; + if (sa->sa_family != AF_INET && sa->sa_family != AF_INET6) continue; - error = getnameinfo(sa, sizeof(*sa), nodename2, + if (sa->sa_family == AF_INET) + salen = sizeof(struct sockaddr_in); + if (sa->sa_family == AF_INET6) + salen = sizeof(struct sockaddr_in6); + + error = getnameinfo(sa, salen, nodename2, sizeof(nodename2), NULL, 0, 0); if (!error) { diff --git a/config/plugins/ldap/configldap.c b/config/plugins/ldap/configldap.c index e04c8fc..e2101f4 100644 --- a/config/plugins/ldap/configldap.c +++ b/config/plugins/ldap/configldap.c @@ -14,7 +14,7 @@ #include /* These are defaults. they can be overridden with environment variables - * LDAP_URL & LDAP_BASEDN + * COROSYNC_LDAP_URL & COROSYNC_LDAP_BASEDN */ #define DEFAULT_LDAP_URL "ldap:///" #define DEFAULT_LDAP_BASEDN "dc=chrissie,dc=net"