]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
validate vnn on node flags change
authorAndrew Tridgell <tridge@samba.org>
Thu, 7 Jun 2007 08:13:14 +0000 (18:13 +1000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 7 Jun 2007 08:13:14 +0000 (18:13 +1000)
(This used to be ctdb commit 5628ebbcc2aa61b63c761783c70fe4d8a0070607)

ctdb/common/ctdb_daemon.c

index 761e8fb33e316eb46568baca15ddef4ec33d5390..cecd64fab826213ef43881ad331b03a3ff2b3d06 100644 (file)
@@ -44,10 +44,16 @@ static void flag_change_handler(struct ctdb_context *ctdb, uint64_t srvid,
                return;
        }
 
+       if (!ctdb_validate_vnn(ctdb, c->vnn)) {
+               DEBUG(0,("Bad vnn %u in flag_change_handler\n", c->vnn));
+               return;
+       }
+
        /* don't get the disconnected flag from the other node */
        ctdb->nodes[c->vnn]->flags = 
                (ctdb->nodes[c->vnn]->flags&NODE_FLAGS_DISCONNECTED) 
                | (c->flags & ~NODE_FLAGS_DISCONNECTED);        
+       DEBUG(2,("Node flags for node %u are now 0x%x\n", c->vnn, ctdb->nodes[c->vnn]->flags));
 }
 
 /* called when the "startup" event script has finished */