aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/dns-stuff.c
diff options
context:
space:
mode:
Diffstat (limited to 'dirmngr/dns-stuff.c')
-rw-r--r--dirmngr/dns-stuff.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
index e32e1e3e1..028b065ab 100644
--- a/dirmngr/dns-stuff.c
+++ b/dirmngr/dns-stuff.c
@@ -1591,6 +1591,10 @@ getsrv_libdns (const char *name, struct srventry **list, unsigned int *r_count)
srv->weight = dsrv.weight;
srv->port = dsrv.port;
mem2str (srv->target, dsrv.target, sizeof srv->target);
+ /* Libdns appends the root zone part which is problematic for
+ * most other functions - strip it. */
+ if (*srv->target && (srv->target)[strlen (srv->target)-1] == '.')
+ (srv->target)[strlen (srv->target)-1] = 0;
}
*r_count = srvcount;