When using corosync with clear_node_high_bit setting to yes,
the highest bit is cleared. When all the cluster nodes are in
one subnet, we probably configure the IP addresses as follows:
node1: 147.2.207.64
node2: 147.2.207.192
If the byte order of the nodeid is little endian, wiping off the
highest bit will make the two nodes have the same nodeid!
This patch fixes this by converting the nodeid to network order.
Signed-off-by: Xia Li <xli@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
So we relax netmask check and set to same family as ipaddr
if needed
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
getifaddrs is always available if there is freeifaddr.
all BSD and openindiana have it defined in ifaddr.h.
drop a bunch of obsoleted headers.
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
Logic for binding now works in following way:
- Try to find exact match
- If not exact match is found, use first found network address
This allows set concrete IP even if network settings contains two IPs on
same network.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
list_add_tail is used instead of list_add so ip addresses are inserted
in same order as returned by getifaddrs.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
This not only makes possible to use generic totemip_iface_check, but
also fixes some problems with previous implementation (fixed mask, not
very well supported ipv6, ...)
Tested on OpenIndiana 151a
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Also Linux and BSD/Darwin specific bits are no longer needed, so they
are gone.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Currently totemip_copy (boundto,&ipaddr) is called even when the
required mask is not found.
This patch changes the behavior to only copy the ipaddr when the
mask is found.
The current behavior makes debugging an incorrect config really
confusing.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2409 fd59a12c-fef9-0310-b244-a6a79926bd2f
- services/Makefile.am: add include search paths for config.h
- include/corosync/cs_config.h.in exports LCRSODIR and SOCKETDIR
- tools/Makefile.am: drop -D defines for dirs that are now in
cs_config.h or config.h
- configure.ac: sanitize prefix and exec_prefix paths. Export DIRS in
*config.h
- lib/Makefile.am: : drop -D defines for dirs that are now in
cs_config.h or config.h. Add rule to build lcr_ifact.o or building from
lib/ fails miserably
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1877 fd59a12c-fef9-0310-b244-a6a79926bd2f
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.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1702 fd59a12c-fef9-0310-b244-a6a79926bd2f
when building openais itself but causes problems when installed as those files
will not be in the right place.
So, I've moved these includes out of totemip.h and totem.h and into the .c files
that call them.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1370 fd59a12c-fef9-0310-b244-a6a79926bd2f