If I hashed the whole block I could not retrieve it without knowing it...
authorPhilipp Tölke <toelke@in.tum.de>
Fri, 8 Oct 2010 09:03:37 +0000 (09:03 +0000)
committerPhilipp Tölke <toelke@in.tum.de>
Fri, 8 Oct 2010 09:03:37 +0000 (09:03 +0000)
src/block/plugin_block_dns.c

index 8435c1be0c3856bec67b0a2c3d110281f897a277..6fbb9b6f2bd8ad780b4cd7e4c59e8ff78c7d5cd4 100644 (file)
@@ -100,7 +100,8 @@ block_plugin_dht_get_key (void *cls,
 {
   if (type != GNUNET_BLOCK_TYPE_DNS)
     return GNUNET_SYSERR;
-  GNUNET_CRYPTO_hash(block, block_size, key);
+  const struct GNUNET_DNS_Record* rec = block;
+  GNUNET_CRYPTO_hash(rec->name, rec->namelen, key);
   return GNUNET_OK;
 }