]> git.proxmox.com Git - mirror_corosync.git/commit
Convert the nodeid byte order to be aligned with network order
authorXia Li <xli@suse.com>
Tue, 19 Mar 2013 07:08:13 +0000 (07:08 +0000)
committerJan Friesse <jfriesse@redhat.com>
Tue, 19 Mar 2013 15:39:59 +0000 (16:39 +0100)
commitca6051e80c4293e36824754777908b3c7ecd7283
treeaa6a88c92b01f21d912bfafc1a2f45d3d12432e5
parent52f88d04eaf2ad6c65df34a3401417d0583c6a45
Convert the nodeid byte order to be aligned with network order

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>
exec/totemip.c
test/testcpg.c