The struct type of message(CLUSTERMSG_TYPE_MODULE) in the following code may be used incorrectly.
--------------file: cluster.c, function: clusterProcessPacket--------------------------
} else if (type == CLUSTERMSG_TYPE_MODULE) {
uint32_t explen = sizeof(clusterMsg)-sizeof(union clusterMsgData);
// should be sizeof(clusterMsgModule) ??
explen += sizeof(clusterMsgDataPublish) -
3 + ntohl(hdr->data.module.msg.len);
if (totlen != explen) return 1;
}
It didn't cause an error, because sizeof(clusterMsgDataPublish) is equal to sizeof(clusterMsgModule).
I think this is a risk in later code maintenance.