------------------------------------------------------------ revno: 191 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell <[EMAIL PROTECTED]> branch nick: tridge timestamp: Thu 2007-04-26 15:38:33 +0200 message: validate the vnn modified: common/ctdb.c ctdb.c-20061127094323-t50f58d65iaao5of-2 === modified file 'common/ctdb.c' --- a/common/ctdb.c 2007-04-26 13:28:13 +0000 +++ b/common/ctdb.c 2007-04-26 13:38:33 +0000 @@ -394,7 +394,15 @@ { 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) {