vldbread(addr, (char *)mhblockP, VL_ADDREXTBLK_SIZE);
+ /* Every mh block has the VLCONTBLOCK flag set in the header to
+ * indicate the entry is an 8192 byte extended block. The
+ * VLCONTBLOCK flag is always clear in regular vl entries. The
+ * vlserver depends on the VLCONTBLOCK flag to correctly traverse
+ * the vldb. The flags field is in network byte order. */
+ mhblockP->ex_hdrflags = ntohl(mhblockP->ex_hdrflags);
+
if (block == 0) {
+ /* These header fields are only used in the first mh block. */
mhblockP->ex_count = ntohl(mhblockP->ex_count);
- mhblockP->ex_hdrflags = ntohl(mhblockP->ex_hdrflags);
for (i = 0; i < VL_MAX_ADDREXTBLKS; i++) {
mhblockP->ex_contaddrs[i] = ntohl(mhblockP->ex_contaddrs[i]);
}
readMH(mhinfo[i].addr, i, MHblock);
if (MHblock->ex_hdrflags != VLCONTBLOCK) {
log_error
- (VLDB_CHECK_ERROR,"address %u (offset 0x%0x): Multihomed Block 0: Not a multihomed block\n",
- header->SIT, OFFSET(header->SIT));
+ (VLDB_CHECK_ERROR,"address %u (offset 0x%0x): Multihomed Block %d: Not a multihomed block\n",
+ mhinfo[i].addr, OFFSET(mhinfo[i].addr), i);
}
rindex = mhinfo[i].addr / sizeof(vlentry);