[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/cman/daemon cmanccs.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	pcaulfield sourceware org	2007-03-15 09:27:20

Modified files:
	cman/daemon    : cmanccs.c 

Log message:
	Support IP(v4) addresses in cluster.conf
	per bz#232068

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/daemon/cmanccs.c.diff?cvsroot=cluster&r1=1.24&r2=1.25

--- cluster/cman/daemon/cmanccs.c	2007/01/02 15:04:21	1.24
+++ cluster/cman/daemon/cmanccs.c	2007/03/15 09:27:20	1.25
@@ -244,7 +244,6 @@
 	return 0;
 }
 
-
 static int verify_nodename(int cd, char *nodename)
 {
 	char path[MAX_PATH_LEN];
@@ -342,6 +341,23 @@
 			goto out;
 		}
 
+		/* See if it's the IP address that's in cluster.conf */
+		error = getnameinfo(sa, sizeof(*sa), nodename2,
+				    sizeof(nodename2), NULL, 0, NI_NUMERICHOST);
+		if (error)
+			goto out;
+
+		str = NULL;
+		memset(path, 0, 256);
+		sprintf(path, NODE_NAME_PATH_BYNAME, nodename2);
+
+		error = ccs_get(cd, path, &str);
+		if (!error) {
+			free(str);
+			strcpy(nodename, nodename2);
+			goto out;
+		}
+
 		/* truncate this name and try again */
 
 		dot = strstr(nodename2, ".");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]