diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-04-26 15:38:33 +0200 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2007-04-26 15:38:33 +0200 |
commit | e51142c8f38d5b17a34c5ce50bf6a8f9b61e0535 (patch) | |
tree | e6b0091ec8a0c99a63d02eab628a4b58c6947ae6 /ctdb | |
parent | 1b36d7bebd03d9bf2ae15c8ef88838e18a11539b (diff) | |
download | samba-e51142c8f38d5b17a34c5ce50bf6a8f9b61e0535.tar.gz samba-e51142c8f38d5b17a34c5ce50bf6a8f9b61e0535.tar.xz samba-e51142c8f38d5b17a34c5ce50bf6a8f9b61e0535.zip |
validate the vnn
(This used to be ctdb commit 025e58ba2b870ebb861b015d5c79dac7f5402bfb)
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/common/ctdb.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ctdb/common/ctdb.c b/ctdb/common/ctdb.c index 56c621fd7e..c13bf7d0e5 100644 --- a/ctdb/common/ctdb.c +++ b/ctdb/common/ctdb.c @@ -394,7 +394,15 @@ void ctdb_queue_packet(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) { struct ctdb_node *node; ctdb->status.node_packets_sent++; + + if (!ctdb_validate_vnn(ctdb, hdr->destnode)) { + DEBUG(0,(__location__ " cant send to node %u that does not exist\n", + hdr->destnode)); + return; + } + node = ctdb->nodes[hdr->destnode]; + if (hdr->destnode == ctdb->vnn && !(ctdb->flags & CTDB_FLAG_SELF_CONNECT)) { ctdb_defer_packet(ctdb, hdr); } else if (ctdb->methods->queue_pkt(node, (uint8_t *)hdr, hdr->length) != 0) { |