From e51142c8f38d5b17a34c5ce50bf6a8f9b61e0535 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 26 Apr 2007 15:38:33 +0200 Subject: [PATCH] validate the vnn (This used to be ctdb commit 025e58ba2b870ebb861b015d5c79dac7f5402bfb) --- ctdb/common/ctdb.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ctdb/common/ctdb.c b/ctdb/common/ctdb.c index 56c621fd7e7..c13bf7d0e5d 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) { -- 2.47.3