diff options
Diffstat (limited to 'src/gns/gnunet-service-gns_resolver.c')
-rw-r--r-- | src/gns/gnunet-service-gns_resolver.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index 9792aff58..8639a239b 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c | |||
@@ -1766,8 +1766,8 @@ recursive_gns2dns_resolution (struct GNS_ResolverHandle *rh, | |||
1766 | continue; | 1766 | continue; |
1767 | } | 1767 | } |
1768 | tld = GNS_get_tld (ip); | 1768 | tld = GNS_get_tld (ip); |
1769 | if (0 != strcmp (tld, | 1769 | if ((0 != strcmp (tld, "+")) && |
1770 | "+")) | 1770 | (GNUNET_OK != GNUNET_GNSRECORD_zkey_to_pkey (tld, &zone))) |
1771 | { | 1771 | { |
1772 | /* 'ip' is a DNS name */ | 1772 | /* 'ip' is a DNS name */ |
1773 | gp = GNUNET_new (struct Gns2DnsPending); | 1773 | gp = GNUNET_new (struct Gns2DnsPending); |
@@ -1790,16 +1790,19 @@ recursive_gns2dns_resolution (struct GNS_ResolverHandle *rh, | |||
1790 | ac->authority_info.dns_authority.gp_tail, | 1790 | ac->authority_info.dns_authority.gp_tail, |
1791 | gp); | 1791 | gp); |
1792 | gp->rh = GNUNET_new (struct GNS_ResolverHandle); | 1792 | gp->rh = GNUNET_new (struct GNS_ResolverHandle); |
1793 | ip = translate_dot_plus (rh, | 1793 | if (0 == strcmp (tld, "+")) |
1794 | ip); | ||
1795 | tld = GNS_get_tld (ip); | ||
1796 | if (GNUNET_OK != | ||
1797 | GNUNET_GNSRECORD_zkey_to_pkey (tld, | ||
1798 | &zone)) | ||
1799 | { | 1794 | { |
1800 | GNUNET_break_op (0); | 1795 | ip = translate_dot_plus (rh, |
1801 | GNUNET_free (ip); | 1796 | ip); |
1802 | continue; | 1797 | tld = GNS_get_tld (ip); |
1798 | if (GNUNET_OK != | ||
1799 | GNUNET_GNSRECORD_zkey_to_pkey (tld, | ||
1800 | &zone)) | ||
1801 | { | ||
1802 | GNUNET_break_op (0); | ||
1803 | GNUNET_free (ip); | ||
1804 | continue; | ||
1805 | } | ||
1803 | } | 1806 | } |
1804 | gp->rh->authority_zone = zone; | 1807 | gp->rh->authority_zone = zone; |
1805 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1808 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -1845,7 +1848,7 @@ recursive_gns2dns_resolution (struct GNS_ResolverHandle *rh, | |||
1845 | if (IDNA_SUCCESS != idna_to_ascii_8z (tmp, &ac->label, IDNA_ALLOW_UNASSIGNED)) | 1848 | if (IDNA_SUCCESS != idna_to_ascii_8z (tmp, &ac->label, IDNA_ALLOW_UNASSIGNED)) |
1846 | { | 1849 | { |
1847 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1850 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
1848 | _("Name `%s' cannot be converted to IDNA."), tmp); | 1851 | _ ("Name `%s' cannot be converted to IDNA."), tmp); |
1849 | return GNUNET_SYSERR; | 1852 | return GNUNET_SYSERR; |
1850 | } | 1853 | } |
1851 | GNUNET_free (tmp); | 1854 | GNUNET_free (tmp); |