summaryrefslogtreecommitdiff
path: root/src/gns
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns')
-rw-r--r--src/gns/gnunet-service-gns_resolver.c7
-rw-r--r--src/gns/plugin_gnsrecord_gns.c15
2 files changed, 21 insertions, 1 deletions
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c
index 51e650b4f..f232fb272 100644
--- a/src/gns/gnunet-service-gns_resolver.c
+++ b/src/gns/gnunet-service-gns_resolver.c
@@ -2393,12 +2393,17 @@ handle_gns_resolution_result (void *cls,
&rd[0]);
return;
- default:
+ case GNUNET_GNSRECORD_TYPE_GNS2DNS:
if (GNUNET_OK ==
recursive_gns2dns_resolution (rh,
rd_count,
rd))
return;
+ default:
+ if (GNUNET_YES != GNUNET_GNSRECORD_is_critical (rd[0].record_type))
+ return;
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ _ ("Unable to process critical delegation record\n"));
break;
}
fail:
diff --git a/src/gns/plugin_gnsrecord_gns.c b/src/gns/plugin_gnsrecord_gns.c
index b37e84ea3..f270e4473 100644
--- a/src/gns/plugin_gnsrecord_gns.c
+++ b/src/gns/plugin_gnsrecord_gns.c
@@ -323,6 +323,7 @@ static struct
{ "VPN", GNUNET_GNSRECORD_TYPE_VPN },
{ "GNS2DNS", GNUNET_GNSRECORD_TYPE_GNS2DNS },
{ "BOX", GNUNET_GNSRECORD_TYPE_BOX },
+ { "REDIRECT", GNUNET_GNSRECORD_TYPE_REDIRECT },
{ NULL, UINT32_MAX } };
@@ -365,6 +366,19 @@ gns_number_to_typename (void *cls, uint32_t type)
}
+static enum GNUNET_GenericReturnValue
+gns_is_critical (void *cls, uint32_t type)
+{
+ return ((type == GNUNET_GNSRECORD_TYPE_PKEY) ||
+ (type == GNUNET_GNSRECORD_TYPE_EDKEY) ||
+ (type == GNUNET_GNSRECORD_TYPE_GNS2DNS) ||
+ (type == GNUNET_GNSRECORD_TYPE_REDIRECT) ?
+ GNUNET_YES : GNUNET_NO);
+}
+
+
+
+
/**
* Entry point for the plugin.
*
@@ -381,6 +395,7 @@ libgnunet_plugin_gnsrecord_gns_init (void *cls)
api->string_to_value = &gns_string_to_value;
api->typename_to_number = &gns_typename_to_number;
api->number_to_typename = &gns_number_to_typename;
+ api->is_critical = &gns_is_critical;
return api;
}