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

[Cluster-devel] cluster/dlm-kernel/src lowcomms.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL46
Changes by:	lhh sourceware org	2007-10-30 17:42:04

Modified files:
	dlm-kernel/src : lowcomms.c 

Log message:
	Fix #338511 - dlm trying to connect from wrong IP

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm-kernel/src/lowcomms.c.diff?cvsroot=cluster&only_with_tag=RHEL46&r1=1.22.2.17&r2=1.22.2.17.2.1

--- cluster/dlm-kernel/src/Attic/lowcomms.c	2007/08/13 20:07:09	1.22.2.17
+++ cluster/dlm-kernel/src/Attic/lowcomms.c	2007/10/30 17:42:04	1.22.2.17.2.1
@@ -555,6 +555,7 @@
 {
 	int result = -EHOSTUNREACH;
 	struct sockaddr_in6 saddr;
+	struct sockaddr_in6 my_addr;
 	int addr_len;
 	struct socket *sock;
 
@@ -589,6 +590,13 @@
 
 	add_sock(sock, con);
 
+	/* Bind to local address before send */
+	memcpy(&my_addr, &local_addr, sizeof(my_addr));
+	result = sock->ops->bind(sock, &my_addr, (int)(sizeof(my_addr)));
+	if (result < 0) {
+		printk("dlm: could not bind to local address for connect: %d\n", result);
+	}
+
 	log_debug2("connecting to %d", con->nodeid);
 	result =
 	    sock->ops->connect(sock, (struct sockaddr *) &saddr, addr_len,


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