public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: master - cman: Look for IPv6 names that match cluster.conf too.
@ 2009-04-06 10:20 Christine Caulfield
0 siblings, 0 replies; only message in thread
From: Christine Caulfield @ 2009-04-06 10:20 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=f3e8b38b29c665b5b4b22e4e8aa95218df914d08
Commit: f3e8b38b29c665b5b4b22e4e8aa95218df914d08
Parent: 458a162d9d2ac626f7400f16fc782856dd97a31f
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: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 <ccaulfie@redhat.com>
---
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 <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"
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-06 10:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-06 10:20 cluster: master - cman: Look for IPv6 names that match cluster.conf too Christine Caulfield
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).