diff options
Diffstat (limited to 'src/gns/gnunet-service-gns_resolver.c')
-rw-r--r-- | src/gns/gnunet-service-gns_resolver.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index edb3d5231..b66516363 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c | |||
@@ -1654,6 +1654,8 @@ recursive_gns2dns_resolution (struct GNS_ResolverHandle *rh, | |||
1654 | size_t off; | 1654 | size_t off; |
1655 | struct Gns2DnsPending *gp; | 1655 | struct Gns2DnsPending *gp; |
1656 | struct GNUNET_CRYPTO_EcdsaPublicKey zone; | 1656 | struct GNUNET_CRYPTO_EcdsaPublicKey zone; |
1657 | struct sockaddr_in v4; | ||
1658 | struct sockaddr_in6 v6; | ||
1657 | 1659 | ||
1658 | if (GNUNET_GNSRECORD_TYPE_GNS2DNS != rd[i].record_type) | 1660 | if (GNUNET_GNSRECORD_TYPE_GNS2DNS != rd[i].record_type) |
1659 | continue; | 1661 | continue; |
@@ -1695,10 +1697,16 @@ recursive_gns2dns_resolution (struct GNS_ResolverHandle *rh, | |||
1695 | } | 1697 | } |
1696 | 1698 | ||
1697 | /* check if 'ip' is already an IPv4/IPv6 address */ | 1699 | /* check if 'ip' is already an IPv4/IPv6 address */ |
1698 | if (GNUNET_OK == | 1700 | if ( (1 == inet_pton (AF_INET, |
1699 | GNUNET_DNSSTUB_add_dns_ip (ac->authority_info.dns_authority.dns_handle, | 1701 | ip, |
1700 | ip)) | 1702 | &v4)) || |
1703 | (1 == inet_pton (AF_INET6, | ||
1704 | ip, | ||
1705 | &v6)) ) | ||
1701 | { | 1706 | { |
1707 | GNUNET_break (GNUNET_OK == | ||
1708 | GNUNET_DNSSTUB_add_dns_ip (ac->authority_info.dns_authority.dns_handle, | ||
1709 | ip)); | ||
1702 | ac->authority_info.dns_authority.found = GNUNET_YES; | 1710 | ac->authority_info.dns_authority.found = GNUNET_YES; |
1703 | GNUNET_free (ip); | 1711 | GNUNET_free (ip); |
1704 | continue; | 1712 | continue; |