Same as before, but the trunk apparently doesn't have the
clear_high_node_bit flag feature.
Andrew can you work up a patch for that feature for trunk?
Thanks
-steve
Index: include/corosync/totem/totemip.h
===================================================================
--- include/corosync/totem/totemip.h (revision 1742)
+++ include/corosync/totem/totemip.h (working copy)
@@ -72,7 +72,7 @@
extern int totemip_totemip_to_sockaddr_convert(struct totem_ip_address *ip_addr,
uint16_t port, struct sockaddr_storage *saddr, int *addrlen);
extern int totemip_parse(struct totem_ip_address *totemip, char *addr, int family);
-extern int totemip_iface_check(struct totem_ip_address *bindnet, struct totem_ip_address *boundto, int *interface_up, int *interface_num);
+extern int totemip_iface_check(struct totem_ip_address *bindnet, struct totem_ip_address *boundto, int *interface_up, int *interface_num, int mask_high_bit);
/* These two simulate a zero in_addr by clearing the family field */
static inline void totemip_zero_set(struct totem_ip_address *addr)
Index: exec/totemnet.c
===================================================================
--- exec/totemnet.c (revision 1742)
+++ exec/totemnet.c (working copy)
@@ -699,18 +699,9 @@
int res;
res = totemip_iface_check (bindnet, bound_to,
- interface_up, interface_num);
+ interface_up, interface_num,
++ 0); // TODO andrew can address this instance->totem_config->clear_node_high_bit);
- /*
- * If the desired binding is to an IPV4 network and nodeid isn't
- * specified, retrieve the node id from this_ip network address
- *
- * IPV6 networks must have a node ID specified since the node id
- * field is only 32 bits.
- */
- if (bound_to->family == AF_INET && bound_to->nodeid == 0) {
- memcpy (&bound_to->nodeid, bound_to->addr, sizeof (int));
- }
return (res);
}
Index: exec/totemip.c
===================================================================
--- exec/totemip.c (revision 1742)
+++ exec/totemip.c (working copy)
@@ -376,7 +376,8 @@
int totemip_iface_check(struct totem_ip_address *bindnet,
struct totem_ip_address *boundto,
int *interface_up,
- int *interface_num)
+ int *interface_num,
+ int mask_high_bit)
{
int fd;
struct {
@@ -514,6 +515,18 @@
}
}
finished:
+ /*
+ * Mask 32nd bit off to workaround bugs in other poeples code
+ * if configuration requests it.
+ */
+ if (ipaddr.family == AF_INET && ipaddr.nodeid == 0) {
+ unsigned int nodeid = 0;
+ memcpy (&nodeid, ipaddr.addr, sizeof (int));
+ if ((nodeid & 0x7FFFFFFF) && mask_high_bit) {
+ nodeid &= 0x7FFFFFFF;
+ }
+ ipaddr.nodeid = nodeid;
+ }
totemip_copy (boundto, &ipaddr);
close(fd);
return 0;
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais