diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-04-06 04:43:54 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:49:51 -0500 |
commit | a9044f92c9f6eb74c5f7cb56f43a6f8ea25ccb2a (patch) | |
tree | 66051e9710511ad3a8bac9722696f9931539e947 /source4/cluster/ctdb/common/ctdb.c | |
parent | 4685a42eaf28e0d4644bfa4cf18ef08abee329d3 (diff) | |
download | samba-a9044f92c9f6eb74c5f7cb56f43a6f8ea25ccb2a.tar.gz samba-a9044f92c9f6eb74c5f7cb56f43a6f8ea25ccb2a.tar.bz2 samba-a9044f92c9f6eb74c5f7cb56f43a6f8ea25ccb2a.zip |
r22098: merged from bzr tree
(This used to be commit a57af1ff8234ab590ebf28b3316953bec880005c)
Diffstat (limited to 'source4/cluster/ctdb/common/ctdb.c')
-rw-r--r-- | source4/cluster/ctdb/common/ctdb.c | 10 |
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); |