summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-03-18 08:52:01 +0100
committerMartin Schanzenbach <schanzen@gnunet.org>2022-03-18 08:52:01 +0100
commitfcbabc6b637ba341c7a86e240302010a4429d41c (patch)
tree89c155bcf78c060149c7f97536afe12ebff47e3a /src
parent91e246223d83075b68f15030aa06885e64fa538d (diff)
GNS: Fix BOX handling in apex
Diffstat (limited to 'src')
-rw-r--r--src/gns/gnunet-service-gns_resolver.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c
index bb3dc215a..9d26e1777 100644
--- a/src/gns/gnunet-service-gns_resolver.c
+++ b/src/gns/gnunet-service-gns_resolver.c
@@ -623,6 +623,19 @@ resolver_lookup_get_next_label (struct GNS_ResolverHandle *rh)
rp = rh->name;
rh->name_resolution_pos = 0;
}
+ else if (('_' == dot[1]) &&
+ ('_' == rh->name[0]) &&
+ (dot == memchr (rh->name, (int) '.', rh->name_resolution_pos)))
+ {
+ /**
+ * Do not advance a label. This seems to be a name only consisting
+ * of a BOX indicator (_443,_tcp).
+ * Which means, it is a BOX under the empty label.
+ * leaving name_resolution_pos as is and returning empty label.
+ */
+ rp = GNUNET_GNS_EMPTY_LABEL_AT;
+ len = strlen (GNUNET_GNS_EMPTY_LABEL_AT);
+ }
else
{
/* advance by one label */