summaryrefslogtreecommitdiff
path: root/source4/cluster/ctdb/common/ctdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/cluster/ctdb/common/ctdb.c')
-rw-r--r--source4/cluster/ctdb/common/ctdb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/cluster/ctdb/common/ctdb.c b/source4/cluster/ctdb/common/ctdb.c
index e4f7289550..da07192c21 100644
--- a/source4/cluster/ctdb/common/ctdb.c
+++ b/source4/cluster/ctdb/common/ctdb.c
@@ -205,6 +205,16 @@ static void ctdb_recv_pkt(struct ctdb_context *ctdb, uint8_t *data, uint32_t len
return;
}
+ if (hdr->ctdb_magic != CTDB_MAGIC) {
+ ctdb_set_error(ctdb, "Non CTDB packet rejected\n");
+ return;
+ }
+
+ if (hdr->ctdb_version != CTDB_VERSION) {
+ ctdb_set_error(ctdb, "Bad CTDB version 0x%x rejected\n", hdr->ctdb_version);
+ return;
+ }
+
switch (hdr->operation) {
case CTDB_REQ_CALL:
ctdb_request_call(ctdb, hdr);