[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: 	RHEL45
Changes by:	lhh sourceware org	2007-11-07 18:55:47

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

Log message:
	Apply patch from 338511 to fix 4.5 bug #362641

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

--- cluster/dlm-kernel/src/Attic/lowcomms.c	2007/08/13 20:09:20	1.22.2.13.2.3
+++ cluster/dlm-kernel/src/Attic/lowcomms.c	2007/11/07 18:55:47	1.22.2.13.2.4
@@ -555,6 +555,7 @@
 {
 	int result = -EHOSTUNREACH;
 	struct sockaddr_in6 saddr;
+	struct sockaddr_in6 my_addr;
 	int addr_len;
 	struct socket *sock;
 
@@ -585,6 +586,16 @@
 	sock->sk->sk_user_data = con;
 	con->rx_action = receive_from_sock;
 
+	/* Bind to local address before send */
+	memcpy(&my_addr, &local_addr, sizeof(my_addr));
+	make_sockaddr(&my_addr, 0, &addr_len);
+	result = sock->ops->bind(sock, (struct sockaddr *) &my_addr,
+				 (int) sizeof(my_addr));
+	if (result < 0) {
+		printk("dlm: could not bind for connect: %d\n", result);
+	}
+
+	/* Set up for connect */
 	make_sockaddr(&saddr, dlm_config.tcp_port, &addr_len);
 
 	add_sock(sock, con);


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