This patch allows whitetank/corosync to behave correctly when the
supplied value of bindnetaddr has more precision than the netmask, but
is not a full IPv4 address.
For example, currently, if the netmask is /16 but the user specifies
192.168.1.0, then OpenAIS is unable to determine the correct address
and uses the loopback address instead.
The following patch allows OpenAIS to correctly determine which
interface/address to use.
--- a/exec/totemip.c Tue Nov 11 10:48:41 2008 +0100
+++ b/exec/totemip.c Thu Nov 13 20:36:58 2008 +0100
@@ -516,7 +516,7 @@ int totemip_iface_check(struct totem_ip_
memcpy(&network,
RTA_DATA(tb[IFA_BROADCAST]), sizeof(uint32_t));
memcpy(&addr, bindnet->addr,
sizeof(uint32_t));
- if (addr == (network & netmask)) {
+ if ((addr & netmask) == (network &
netmask)) {
memcpy(ipaddr.addr,
RTA_DATA(tb[IFA_ADDRESS]), TOTEMIP_ADDRLEN);
found_if = 1;
}
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais