The current totem code searches for interfaces and finds them by doing a
calculation if (netmask & interface) == (netmask & bindnetaddr) then it
binds the address.

The current code uses the entirely wrong address for "interface" using
the "broadcast" parameter (printed from ifconfig) rather then the local
interface address.

patch to fix

Regards
-steve

Index: exec/totemip.c
===================================================================
--- exec/totemip.c	(revision 2542)
+++ exec/totemip.c	(working copy)
@@ -561,12 +561,12 @@
 
 				/* If the address we have is an IPv4 network address, then
 				   substitute the actual IP address of this interface */
-				if (!found_if && tb[IFA_BROADCAST] && ifa->ifa_family == AF_INET) {
+				if (!found_if && tb[IFA_LOCAL] && ifa->ifa_family == AF_INET) {
 					uint32_t network;
 					uint32_t addr;
 					uint32_t netmask = htonl(~((1<<(32-ifa->ifa_prefixlen))-1));
 
-					memcpy(&network, RTA_DATA(tb[IFA_BROADCAST]), sizeof(uint32_t));
+					memcpy(&network, RTA_DATA(tb[IFA_LOCAL]), sizeof(uint32_t));
 					memcpy(&addr, bindnet->addr, sizeof(uint32_t));
 
 					if ((addr & netmask) == (network & netmask)) {
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to