Rev 191: validate the vnn in http://samba.org/~tridge/ctdb

tridge at samba.org tridge at samba.org
Thu Apr 26 13:38:34 GMT 2007


------------------------------------------------------------
revno: 191
revision-id: tridge at samba.org-20070426133833-4ks6f3c2exb25p1q
parent: tridge at samba.org-20070426133317-geuqvda21m707azi
committer: Andrew Tridgell <tridge at samba.org>
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) {



More information about the samba-cvs mailing list