]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
validate the vnn
authorAndrew Tridgell <tridge@samba.org>
Thu, 26 Apr 2007 13:38:33 +0000 (15:38 +0200)
committerAndrew Tridgell <tridge@samba.org>
Thu, 26 Apr 2007 13:38:33 +0000 (15:38 +0200)
(This used to be ctdb commit 025e58ba2b870ebb861b015d5c79dac7f5402bfb)

ctdb/common/ctdb.c

index 56c621fd7e71b7547a278b61dd239baf51ea6152..c13bf7d0e5d9f9bb257300d0de0b99a07b4098e3 100644 (file)
@@ -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) {