From: Andrew Tridgell Date: Thu, 26 Apr 2007 13:38:33 +0000 (+0200) Subject: validate the vnn X-Git-Tag: tevent-0.9.20~348^2~2840 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e51142c8f38d5b17a34c5ce50bf6a8f9b61e0535;p=thirdparty%2Fsamba.git validate the vnn (This used to be ctdb commit 025e58ba2b870ebb861b015d5c79dac7f5402bfb) --- 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) {