public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: Christine Caulfield <chrissie@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: cluster: STABLE3 - cman: Look for IPv6 names that match cluster.conf too.
Date: Mon, 06 Apr 2009 10:17:00 -0000	[thread overview]
Message-ID: <20090406101721.0C09212036D@lists.fedorahosted.org> (raw)

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=abc092893125eae0cfdd87f4671f62a05507310e
Commit:        abc092893125eae0cfdd87f4671f62a05507310e
Parent:        db80c18fa1cb23968cccbe1809ba6013e9a29c70
Author:        Christine Caulfield <ccaulfie@redhat.com>
AuthorDate:    Mon Apr 6 11:15:47 2009 +0100
Committer:     Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Mon Apr 6 11:15:47 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 <ccaulfie@redhat.com>
---
 cman/daemon/cman-preconfig.c     |   13 +++++++++++--
 config/plugins/ldap/configldap.c |    2 +-
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/cman/daemon/cman-preconfig.c b/cman/daemon/cman-preconfig.c
index 22ab959..a7bf92f 100644
--- a/cman/daemon/cman-preconfig.c
+++ b/cman/daemon/cman-preconfig.c
@@ -398,13 +398,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 <corosync/engine/config.h>
 
 /* 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"


                 reply	other threads:[~2009-04-06 10:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090406101721.0C09212036D@lists.fedorahosted.org \
    --to=chrissie@fedoraproject.org \
    --cc=cluster-cvs-relay@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).