This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".
The branch, master has been updated
via 4b49aac718e1c8d703d4c4de6dd9fa9bfe83c932 (commit)
from 446a3d0249ea5f352047233103b9e0ade611466d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
/* Return the address family of an IP[46] name */
-static int address_family(char *addr)
+static int address_family(char *addr, struct sockaddr_storage *ssaddr)
{
struct addrinfo *ainfo;
struct addrinfo ahints;
+ int family;
int ret;
memset(&ahints, 0, sizeof(ahints));
@@ -165,7 +172,12 @@ static int address_family(char *addr)
if (ret)
return -1;
@@ -178,14 +190,14 @@ static int add_ifaddr(struct objdb_iface_ver0 *objdb, char *mcast, char *ifaddr,
int ret = 0;
/* Check the families match */
- if (address_family(mcast) !=
- address_family(ifaddr)) {
+ if (address_family(mcast, &mcast_addr) !=
+ address_family(ifaddr, &if_addr)) {
sprintf(error_reason, "Node address family does not match multicast address family");
return -1;
}
/* Check it's not bound to localhost, sigh */
- get_localhost(mcast_addr.ss_family, &localhost);
+ get_localhost(if_addr.ss_family, &localhost);
if (ipaddr_equal(&localhost, &if_addr)) {
sprintf(error_reason, "Node address is localhost, please choose a real host address");
return -1;