Patch solves problem, when user didn't set nodeid in configuration file
on BSD / Darwin like systems. Nodeid is generated from ip address in
same way as on Linux is.
Regards,
Honza
commit 564c80d2cfbc523565e1e371e0ef4d0b1dd5ba33
Author: Jan Friesse <[email protected]>
Date: Fri Jan 8 11:44:28 2010 +0100
Set nodeid value when is not set on BSD
diff --git a/trunk/exec/totemip.c b/trunk/exec/totemip.c
index 9e1bc44..f6613e8 100644
--- a/trunk/exec/totemip.c
+++ b/trunk/exec/totemip.c
@@ -447,6 +447,25 @@ int totemip_iface_check(struct totem_ip_address *bindnet,
*/
*interface_up = ifa->ifa_flags & IFF_UP;
*interface_num = if_nametoindex(ifa->ifa_name);
+
+ /*
+ * Handle case, when nodeid is set to 0 or not set.
+ */
+ if (bindnet->family == AF_INET && bindnet->nodeid == 0) {
+ unsigned int nodeid = 0;
+ memcpy (&nodeid, boundto->addr, sizeof (int));
+#if _BYTE_ORDER == _BIG_ENDIAN
+ nodeid = swab32 (nodeid);
+#endif
+ /*
+ * Mask 32nd bit off to workaround bugs in other peoples code
+ * (if configuration requests it).
+ */
+ if (mask_high_bit) {
+ nodeid &= 0x7FFFFFFF;
+ }
+ boundto->nodeid = nodeid;
+ }
res = 0;
break; /* for */
}
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais