aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2020-10-15 08:47:45 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2020-10-15 12:11:21 +0200
commit7b992510c25c0081c59c4b1f61fe42ff5dc7680d (patch)
tree100612d1c61a478a318db83cbfec94fcb2cf90a0
parentdba32dc385bf922c7cd91eecc209e1a37b96c137 (diff)
downloadgnunet-7b992510c25c0081c59c4b1f61fe42ff5dc7680d.tar.gz
gnunet-7b992510c25c0081c59c4b1f61fe42ff5dc7680d.zip
- fix gns
-rw-r--r--src/gns/gnunet-service-gns_resolver.c9
-rw-r--r--src/gnsrecord/gnsrecord_misc.c5
2 files changed, 10 insertions, 4 deletions
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c
index 09b7a0a85..16be7dedf 100644
--- a/src/gns/gnunet-service-gns_resolver.c
+++ b/src/gns/gnunet-service-gns_resolver.c
@@ -1696,10 +1696,11 @@ recursive_pkey_resolution (struct GNS_ResolverHandle *rh,
1696 const struct GNUNET_GNSRECORD_Data *rd) 1696 const struct GNUNET_GNSRECORD_Data *rd)
1697{ 1697{
1698 struct AuthorityChain *ac; 1698 struct AuthorityChain *ac;
1699 struct GNUNET_IDENTITY_PublicKey auth;
1699 1700
1700 /* delegation to another zone */ 1701 /* delegation to another zone */
1701 if (sizeof(struct GNUNET_IDENTITY_PublicKey) != 1702 if (GNUNET_OK != GNUNET_GNSRECORD_record_to_identity_key (rd,
1702 rd->data_size) 1703 &auth))
1703 { 1704 {
1704 GNUNET_break_op (0); 1705 GNUNET_break_op (0);
1705 fail_resolution (rh); 1706 fail_resolution (rh);
@@ -1709,6 +1710,7 @@ recursive_pkey_resolution (struct GNS_ResolverHandle *rh,
1709 ac = GNUNET_new (struct AuthorityChain); 1710 ac = GNUNET_new (struct AuthorityChain);
1710 ac->rh = rh; 1711 ac->rh = rh;
1711 ac->gns_authority = GNUNET_YES; 1712 ac->gns_authority = GNUNET_YES;
1713 ac->authority_info.gns_authority = auth;
1712 GNUNET_GNSRECORD_record_to_identity_key (rd, 1714 GNUNET_GNSRECORD_record_to_identity_key (rd,
1713 &ac->authority_info.gns_authority); 1715 &ac->authority_info.gns_authority);
1714 ac->label = resolver_lookup_get_next_label (rh); 1716 ac->label = resolver_lookup_get_next_label (rh);
@@ -2272,7 +2274,8 @@ handle_gns_resolution_result (void *cls,
2272 ac->rh = rh; 2274 ac->rh = rh;
2273 ac->gns_authority = GNUNET_YES; 2275 ac->gns_authority = GNUNET_YES;
2274 GNUNET_GNSRECORD_record_to_identity_key (&rd[i], 2276 GNUNET_GNSRECORD_record_to_identity_key (&rd[i],
2275 &ac->authority_info.gns_authority); 2277 &ac->authority_info.
2278 gns_authority);
2276 ac->label = GNUNET_strdup (GNUNET_GNS_EMPTY_LABEL_AT); 2279 ac->label = GNUNET_strdup (GNUNET_GNS_EMPTY_LABEL_AT);
2277 GNUNET_CONTAINER_DLL_insert_tail (rh->ac_head, 2280 GNUNET_CONTAINER_DLL_insert_tail (rh->ac_head,
2278 rh->ac_tail, 2281 rh->ac_tail,
diff --git a/src/gnsrecord/gnsrecord_misc.c b/src/gnsrecord/gnsrecord_misc.c
index cfe310422..4b1695d69 100644
--- a/src/gnsrecord/gnsrecord_misc.c
+++ b/src/gnsrecord/gnsrecord_misc.c
@@ -329,7 +329,10 @@ enum GNUNET_GenericReturnValue
329GNUNET_GNSRECORD_record_to_identity_key (const struct GNUNET_GNSRECORD_Data *rd, 329GNUNET_GNSRECORD_record_to_identity_key (const struct GNUNET_GNSRECORD_Data *rd,
330 struct GNUNET_IDENTITY_PublicKey *key) 330 struct GNUNET_IDENTITY_PublicKey *key)
331{ 331{
332 switch (ntohl (rd->record_type)) 332 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
333 "Got record of type %u\n",
334 rd->record_type);
335 switch (rd->record_type)
333 { 336 {
334 case GNUNET_GNSRECORD_TYPE_PKEY: 337 case GNUNET_GNSRECORD_TYPE_PKEY:
335 key->type = htonl (rd->record_type); 338 key->type = htonl (rd->record_type);