totemip does not call ntohs() on the port numbers it puts into the
sockaddr structures.

The effect of this is that the port number in corosync.conf is used
byteswapped. eg: setting mcastport: 5405 causes corosync to bind to
ports 7445 and 7189 !

The attached patch fixes this but breaks cman. That's my problem ;-)
-- 

Chrissie
Index: exec/totemip.c
===================================================================
--- exec/totemip.c	(revision 1692)
+++ exec/totemip.c	(working copy)
@@ -226,7 +226,7 @@
 		sin->sin_len = sizeof(struct sockaddr_in);
 #endif
 		sin->sin_family = ip_addr->family;
-		sin->sin_port = port;
+		sin->sin_port = ntohs(port);
 		memcpy(&sin->sin_addr, ip_addr->addr, sizeof(struct in_addr));
 		*addrlen = sizeof(struct sockaddr_in);
 		ret = 0;
@@ -240,7 +240,7 @@
 		sin->sin6_len = sizeof(struct sockaddr_in6);
 #endif
 		sin->sin6_family = ip_addr->family;
-		sin->sin6_port = port;
+		sin->sin6_port = ntohs(port);
 		sin->sin6_scope_id = 2;
 		memcpy(&sin->sin6_addr, ip_addr->addr, sizeof(struct in6_addr));
 
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to